Commit 093d280d authored by Jason R. Coombs's avatar Jason R. Coombs Committed by GitHub

Merge pull request #988 from estyrke/patch-1

Fix for auto_chmod behavior
parents d4c215a7 20aca0e3
...@@ -1675,7 +1675,7 @@ def _first_line_re(): ...@@ -1675,7 +1675,7 @@ def _first_line_re():
def auto_chmod(func, arg, exc): def auto_chmod(func, arg, exc):
if func is os.remove and os.name == 'nt': if func in [os.unlink, os.remove] and os.name == 'nt':
chmod(arg, stat.S_IWRITE) chmod(arg, stat.S_IWRITE)
return func(arg) return func(arg)
et, ev, _ = sys.exc_info() et, ev, _ = sys.exc_info()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment