From 7e0e4cced05dd60e5c07964f7df6c65094348628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Mon, 7 Aug 2017 19:28:54 +0200 Subject: [PATCH] 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. --- gajim/plugins/pluginmanager.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gajim/plugins/pluginmanager.py b/gajim/plugins/pluginmanager.py index bba599ce1..4fadae186 100644 --- a/gajim/plugins/pluginmanager.py +++ b/gajim/plugins/pluginmanager.py @@ -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):