summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
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)