summaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorBrian Coca <brian.coca+git@gmail.com>2016-06-16 18:12:38 -0400
committerBrian Coca <brian.coca+git@gmail.com>2016-06-16 18:12:38 -0400
commita1e6311197a7b887adaf60725b01562883b8e72f (patch)
tree42b105679525faa4ea15f008fc23561f9c2a8b45 /utilities
parentb2b5fceea2ea6b580bc66574819eb1bba636cebe (diff)
downloadansible-modules-core-a1e6311197a7b887adaf60725b01562883b8e72f.tar.gz
reverted need for module utils imports
Diffstat (limited to 'utilities')
-rw-r--r--utilities/logic/async_wrapper.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/utilities/logic/async_wrapper.py b/utilities/logic/async_wrapper.py
index a375c25b..078f3388 100644
--- a/utilities/logic/async_wrapper.py
+++ b/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,