From 3a20fc4d0c974e5781f5611f3284ef20c5192a02 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) --- .travis.yml | 3 +-- utilities/logic/wait_for.py | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8bc87cb5163..03b131a7aff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,8 +83,7 @@ env: cloud/vmware/vsphere_guest.py utilities/helper/accelerate.py utilities/logic/async_status.py - utilities/logic/async_wrapper.py - utilities/logic/wait_for.py" + utilities/logic/async_wrapper.py" before_install: - git config user.name "ansible" - git config user.email "ansible@ansible.com" diff --git a/utilities/logic/wait_for.py b/utilities/logic/wait_for.py index a92fcac6252..3440cf5f41b 100644 --- a/utilities/logic/wait_for.py +++ b/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