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,7 +253,8 @@ def LoadPlugins(bundlepath=None, userpath=None, thirdpartypath=None):
|
|||
if not os.path.isdir( plugins_dir ):
|
||||
continue
|
||||
|
||||
sys.path.append( plugins_dir )
|
||||
if plugins_dir not in sys.path:
|
||||
sys.path.append( plugins_dir )
|
||||
|
||||
for module in os.listdir(plugins_dir):
|
||||
fullPath = os.path.join( plugins_dir, module )
|
||||
|
|
Loading…
Reference in New Issue