diff options
author | Michael Scherer <mscherer@users.noreply.github.com> | 2016-05-23 15:44:57 +0200 |
---|---|---|
committer | Brian Coca <bcoca@ansible.com> | 2016-05-23 09:44:57 -0400 |
commit | a780dbf4e191ba10e33a235559036454cce3aceb (patch) | |
tree | c885157745f886a5fcf171219faa1e1f3038e37f /files | |
parent | 7e08d0101066e4cc537e420e4af32b3a2b669c8f (diff) | |
download | ansible-modules-extras-a780dbf4e191ba10e33a235559036454cce3aceb.tar.gz |
Port patch.py to python3/python2.4 syntax (#2276)
Diffstat (limited to 'files')
-rw-r--r-- | files/patch.py | 3 |
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) |