Fix double loading plugins and sys.path entires multiplying
This commit is contained in:
parent
b9a834e600
commit
b53b68c686
|
@ -67,7 +67,7 @@ bool SCRIPTING_TOOL::Init()
|
|||
PyDict_SetItemString( sys_mod, "_pcbnew", mod );
|
||||
Py_DECREF( mod );
|
||||
|
||||
callLoadPlugins();
|
||||
// plugins will be loaded later via ReloadPlugins()
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -253,6 +253,7 @@ def LoadPlugins(bundlepath=None, userpath=None, thirdpartypath=None):
|
|||
if not os.path.isdir( plugins_dir ):
|
||||
continue
|
||||
|
||||
if plugins_dir not in sys.path:
|
||||
sys.path.append( plugins_dir )
|
||||
|
||||
for module in os.listdir(plugins_dir):
|
||||
|
|
Loading…
Reference in New Issue