Commit 7eadf62c authored by Alain Takoudjou's avatar Alain Takoudjou

grid.promise: do not always reload promise module

The reload part is mainly used for tests, module is reloaded if the promise file has changed. Here, __file__ ends with pyc when promise_path ends with py.
parent 36698874
......@@ -198,7 +198,7 @@ class PromiseProcess(Process):
raise RuntimeError("RunPromise class is not a subclass of " \
"GenericPromise class.")
if promise_module.__file__ != self.promise_path:
if 'py'.join(promise_module.__file__.rsplit('pyc')) != self.promise_path:
# cached module need to be updated
promise_module = reload_module(promise_module)
# load extra parameters
......
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