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