Commit 52941a83 authored by Jack Jansen's avatar Jack Jansen

Test that chmod() actually exists before calling it (it doesn't on MacOS9).

parent 27d19c40
......@@ -309,7 +309,8 @@ class FileInput:
perm)
self._output = os.fdopen(fd, "w")
try:
os.chmod(self._filename, perm)
if hasattr(os, 'chmod'):
os.chmod(self._filename, perm)
except OSError:
pass
self._savestdout = sys.stdout
......
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