Commit 36698874 authored by Alain Takoudjou's avatar Alain Takoudjou

promise: fix compatibility with promises running using old slapos.core version

parent 952fe00d
...@@ -156,7 +156,9 @@ class PromiseProcess(Process): ...@@ -156,7 +156,9 @@ class PromiseProcess(Process):
promise_module = self._loadPromiseModule() promise_module = self._loadPromiseModule()
promise_instance = promise_module.RunPromise(self.argument_dict) promise_instance = promise_module.RunPromise(self.argument_dict)
if (promise_instance.isAnomalyDetected() and self.check_anomaly) or \ if not hasattr(promise_instance, 'isAnomalyDetected') or not \
hasattr(promise_instance, 'isTested') or \
(promise_instance.isAnomalyDetected() and self.check_anomaly) or \
(promise_instance.isTested() and not self.check_anomaly): (promise_instance.isTested() and not self.check_anomaly):
# if the promise will run, we save execution timestamp # if the promise will run, we save execution timestamp
self.setPromiseStartTimestamp() self.setPromiseStartTimestamp()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment