summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorMichael Scherer <mscherer@users.noreply.github.com>2016-05-23 15:44:57 +0200
committerBrian Coca <bcoca@ansible.com>2016-05-23 09:44:57 -0400
commita780dbf4e191ba10e33a235559036454cce3aceb (patch)
treec885157745f886a5fcf171219faa1e1f3038e37f /files
parent7e08d0101066e4cc537e420e4af32b3a2b669c8f (diff)
downloadansible-modules-extras-a780dbf4e191ba10e33a235559036454cce3aceb.tar.gz
Port patch.py to python3/python2.4 syntax (#2276)
Diffstat (limited to 'files')
-rw-r--r--files/patch.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/files/patch.py b/files/patch.py
index af3178ba..123d667f 100644
--- a/files/patch.py
+++ b/files/patch.py
@@ -185,7 +185,8 @@ def main():
apply_patch( patch_func, p.src, p.basedir, dest_file=p.dest, binary=p.binary, strip=p.strip,
dry_run=module.check_mode, backup=p.backup )
changed = True
- except PatchError, e:
+ except PatchError:
+ e = get_exception()
module.fail_json(msg=str(e))
module.exit_json(changed=changed)