Fix exception handling in async_wrapper
This commit is contained in:
parent
259c4b31fb
commit
1b88df0bda
1 changed files with 2 additions and 2 deletions
|
@ -202,11 +202,11 @@ if __name__ == '__main__':
|
||||||
except SystemExit:
|
except SystemExit:
|
||||||
# On python2.4, SystemExit is a subclass of Exception.
|
# On python2.4, SystemExit is a subclass of Exception.
|
||||||
# This block makes python2.4 behave the same as python2.5+
|
# This block makes python2.4 behave the same as python2.5+
|
||||||
e = get_exception()
|
e = sys.exc_info()[1]
|
||||||
sys.exit(e.code)
|
sys.exit(e.code)
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
e = get_exception()
|
e = sys.exc_info()[1]
|
||||||
notice("error: %s"%(e))
|
notice("error: %s"%(e))
|
||||||
print(json.dumps({
|
print(json.dumps({
|
||||||
"failed" : True,
|
"failed" : True,
|
||||||
|
|
Loading…
Reference in a new issue