From 176d9f6449f0ed13c57ae7cbdd69941ec7584d44 Mon Sep 17 00:00:00 2001 From: Jeffrey Townsend Date: Wed, 30 Nov 2016 22:12:27 +0000 Subject: [PATCH] The imported module name must be unique. Otherwise the existing import will just be reused. --- .../vendor-config-onl/src/python/onl/install/BaseInstall.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/base/all/vendor-config-onl/src/python/onl/install/BaseInstall.py b/packages/base/all/vendor-config-onl/src/python/onl/install/BaseInstall.py index f0a4ae6b..00b081f1 100644 --- a/packages/base/all/vendor-config-onl/src/python/onl/install/BaseInstall.py +++ b/packages/base/all/vendor-config-onl/src/python/onl/install/BaseInstall.py @@ -428,7 +428,8 @@ class Base: self.log.info("loading plugins from %s", pyPath) with open(pyPath) as fd: sfx = ('.py', 'U', imp.PY_SOURCE,) - mod = imp.load_module("plugin", fd, pyPath, sfx) + moduleName = os.path.splitext(os.path.basename(pyPath))[0] + mod = imp.load_module("onl_install_plugin_%s" % moduleName, fd, pyPath, sfx) for attr in dir(mod): klass = getattr(mod, attr) if isinstance(klass, type) and issubclass(klass, Plugin):