From f595b27e47421bb7feee99306cdc5d4622fbc0b8 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 16 Jun 2016 18:12:38 -0400 Subject: [PATCH] reverted need for module utils imports --- lib/ansible/modules/utilities/logic/async_wrapper.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/ansible/modules/utilities/logic/async_wrapper.py b/lib/ansible/modules/utilities/logic/async_wrapper.py index a375c25b223..078f3388c39 100644 --- a/lib/ansible/modules/utilities/logic/async_wrapper.py +++ b/lib/ansible/modules/utilities/logic/async_wrapper.py @@ -32,9 +32,6 @@ import signal import time import syslog -# Backwards compat. There were present in basic.py before -from ansible.module_utils.pycompat24 import get_exception - syslog.openlog('ansible-%s' % os.path.basename(__file__)) syslog.syslog(syslog.LOG_NOTICE, 'Invoked with %s' % " ".join(sys.argv[1:])) @@ -49,7 +46,7 @@ def daemonize_self(): # exit first parent sys.exit(0) except OSError: - e = get_exception() + e = sys.exc_info()[1] sys.exit("fork #1 failed: %d (%s)\n" % (e.errno, e.strerror)) # decouple from parent environment @@ -64,7 +61,7 @@ def daemonize_self(): # print "Daemon PID %d" % pid sys.exit(0) except OSError: - e = get_exception() + e = sys.exc_info()[1] sys.exit("fork #2 failed: %d (%s)\n" % (e.errno, e.strerror)) dev_null = file('/dev/null','rw') @@ -90,7 +87,7 @@ def _run_module(wrapped_cmd, jid, job_path): result = json.loads(outdata) except (OSError, IOError): - e = get_exception() + e = sys.exc_info()[1] result = { "failed": 1, "cmd" : wrapped_cmd,