1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix exception handling in async_wrapper

This commit is contained in:
Toshio Kuratomi 2016-06-16 12:21:57 -07:00 committed by Matt Clay
parent 259c4b31fb
commit 1b88df0bda

View file

@ -202,11 +202,11 @@ if __name__ == '__main__':
except SystemExit:
# On python2.4, SystemExit is a subclass of Exception.
# This block makes python2.4 behave the same as python2.5+
e = get_exception()
e = sys.exc_info()[1]
sys.exit(e.code)
except Exception:
e = get_exception()
e = sys.exc_info()[1]
notice("error: %s"%(e))
print(json.dumps({
"failed" : True,