Commit 5c11e240 authored by Philipp Hörist's avatar Philipp Hörist

Reload plugins if already loaded

parent 8e860561
......@@ -493,11 +493,14 @@ class PluginManager(metaclass=Singleton):
module = None
if module_name in sys.modules:
# do not load the module twice
module = __import__(module_name)
if module_name in sys.modules:
from imp import reload'Reloading %s', module_name)
module = reload(sys.modules[module_name])
else:'Loading %s', module_name)
module = __import__(module_name)
except Exception as error:
"While trying to load {plugin}, exception occurred".format(plugin=elem_name),
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