Now default_evaluator is provided by runtime package
authorEdouard Tisserant
Tue, 09 Apr 2019 13:13:27 +0200
changeset 2585 fc6f441582cb
parent 2584 adfdeaba5a6a
child 2586 b89484560a97
Now default_evaluator is provided by runtime package
Beremiz_service.py
--- a/Beremiz_service.py	Tue Apr 09 13:08:03 2019 +0200
+++ b/Beremiz_service.py	Tue Apr 09 13:13:27 2019 +0200
@@ -40,6 +40,7 @@
 from runtime.xenomai import TryPreloadXenomai
 from runtime import LogMessageAndException
 from runtime import PlcStatus
+from runtime import default_evaluator
 from runtime.Stunnel import ensurePSK
 import util.paths as paths
 
@@ -384,14 +385,6 @@
     os.mkdir(WorkingDir)
 
 
-def default_evaluator(tocall, *args, **kwargs):
-    try:
-        res = (tocall(*args, **kwargs), None)
-    except Exception:
-        res = (None, sys.exc_info())
-    return res
-
-
 if enabletwisted:
     import warnings
     with warnings.catch_warnings():