issue #477: fix 3.x failure in new target.set_file_mode() function.

issue510
David Wilson 6 years ago
parent 51294db52d
commit aa5d37af89

@ -722,7 +722,9 @@ def set_file_mode(path, spec, fd=None):
"""
Update the permissions of a file using the same syntax as chmod(1).
"""
if isinstance(spec, (int, long)):
if isinstance(spec, int):
new_mode = spec
elif mitogen.core.PY2 and isinstance(spec, long):
new_mode = spec
elif spec.isdigit():
new_mode = int(spec, 8)

Loading…
Cancel
Save