From a780dbf4e191ba10e33a235559036454cce3aceb Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Mon, 23 May 2016 15:44:57 +0200 Subject: Port patch.py to python3/python2.4 syntax (#2276) --- files/patch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'files') 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) -- cgit v1.2.1