Beremiz_service.py
changeset 2309 d8fb90a2e11f
parent 2305 56f1d8aca886
child 2315 523559fe6352
equal deleted inserted replaced
2308:4d7cee25a474 2309:d8fb90a2e11f
   384         res = (tocall(*args, **kwargs), None)
   384         res = (tocall(*args, **kwargs), None)
   385     except Exception:
   385     except Exception:
   386         res = (None, sys.exc_info())
   386         res = (None, sys.exc_info())
   387     return res
   387     return res
   388 
   388 
       
   389 
   389 if enabletwisted:
   390 if enabletwisted:
   390     import warnings
   391     import warnings
   391     with warnings.catch_warnings():
   392     with warnings.catch_warnings():
   392         warnings.simplefilter("ignore")
   393         warnings.simplefilter("ignore")
   393         try:
   394         try:
   436 else:
   437 else:
   437     evaluator = default_evaluator
   438     evaluator = default_evaluator
   438 
   439 
   439 # Exception hooks
   440 # Exception hooks
   440 
   441 
       
   442 
   441 def LogException(*exp):
   443 def LogException(*exp):
   442     LogMessageAndException("", exp)
   444     LogMessageAndException("", exp)
   443 
   445 
   444 
   446 
   445 sys.excepthook = LogException
   447 sys.excepthook = LogException