Commit 8843e121 authored by Xavier Thompson's avatar Xavier Thompson

[wip] recipe/promise_plugin: Use system slapos.core

parent c8245829
......@@ -36,21 +36,6 @@ sys.path[0:0] = %(path)s
extra_config_dict = %(config)s
# We want to cleanup all imported modules from slapos namespace, because
# they will conflict with slapos.core.
# In fact as slapos.grid is already imported, the promise cannot reimport
# his own slapos.grid from an updated sys.path. Then all module imports which
# are not in slapos.core will fail.
#
# call reload(slapos) only solve a part of problem because not all modules
# will be reloaded, and some new modules won't be added.
# The solution is to delete all cached 'slapos' modules as well as all cached
# 'pkg_resources' modules which is responsible of namespace declaration.
# They will be re-imported again using the updated sys.path
for module in list(sys.modules):
if 'slapos' in module or 'pkg_resources' in module:
del sys.modules[module]
%(content)s
'''
......
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