From fefc0cdd506d1f495578e93d6c659b36ae374261 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Mon, 23 May 2016 15:34:27 +0200 Subject: [PATCH] Fix wait_for to compile on python3 (#3722) --- lib/ansible/modules/utilities/logic/wait_for.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/utilities/logic/wait_for.py b/lib/ansible/modules/utilities/logic/wait_for.py index a92fcac6252..3440cf5f41b 100644 --- a/lib/ansible/modules/utilities/logic/wait_for.py +++ b/lib/ansible/modules/utilities/logic/wait_for.py @@ -435,7 +435,8 @@ def main(): if path: try: os.stat(path) - except OSError, e: + except OSError: + e = get_exception() # If anything except file not present, throw an error if e.errno != 2: elapsed = datetime.datetime.now() - start