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:
parent
413c7f52d7
commit
7e0e4cced0
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue