Make file module work on python 2.4, fix #9080

Python 2.4 do not support "except ... as ..." construct, so
revert back to the older syntax.
reviewable/pr18780/r1
Michael Scherer 10 years ago
parent 0d0576a97f
commit d15931f15a

@ -339,7 +339,7 @@ def main():
module.fail_json(msg='Cannot touch other than files and directories') module.fail_json(msg='Cannot touch other than files and directories')
try: try:
module.set_fs_attributes_if_different(file_args, True) module.set_fs_attributes_if_different(file_args, True)
except SystemExit as e: except SystemExit, e:
if e.code: if e.code:
# We take this to mean that fail_json() was called from # We take this to mean that fail_json() was called from
# somewhere in basic.py # somewhere in basic.py

Loading…
Cancel
Save