PluginManager: remove plugin path from sys.path

Remove plugin path from sys.path after importing.

If we scan multiple plugin dirs and never remove the path from
sys.path, it is hard to predict from which path python will import
a package.

The chance that the same plugin package is in multiple plugin paths
is high.
This commit is contained in:
Philipp Hörist 2017-08-07 19:28:54 +02:00
parent 413c7f52d7
commit 7e0e4cced0
1 changed files with 1 additions and 0 deletions

View File

@ -589,6 +589,7 @@ class PluginManager(metaclass=Singleton):
log.debug('%s : %s' % (module_attr_name,
'wrong manifest file. section are required!'))
sys.path.remove(path)
return plugins_found
def install_from_zip(self, zip_filename, owerwrite=None):