Safely load python plugins
Catch potential exceptions when doing the initial python plugin load Fixes https://gitlab.com/kicad/code/kicad/issues/12231
This commit is contained in:
parent
60ba245474
commit
1d223d1439
|
@ -80,8 +80,13 @@ void SCRIPTING_TOOL::ReloadPlugins()
|
|||
// Remove all action plugins so that we don't keep references to old versions
|
||||
ACTION_PLUGINS::UnloadAll();
|
||||
|
||||
PyLOCK lock;
|
||||
callLoadPlugins();
|
||||
try
|
||||
{
|
||||
PyLOCK lock;
|
||||
callLoadPlugins();
|
||||
}
|
||||
catch( ... )
|
||||
{}
|
||||
}
|
||||
|
||||
|
||||
|
@ -91,10 +96,15 @@ int SCRIPTING_TOOL::reloadPlugins( const TOOL_EVENT& aEvent )
|
|||
// Remove all action plugins so that we don't keep references to old versions
|
||||
ACTION_PLUGINS::UnloadAll();
|
||||
|
||||
try
|
||||
{
|
||||
PyLOCK lock;
|
||||
callLoadPlugins();
|
||||
}
|
||||
catch( ... )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
if( !m_isFootprintEditor )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue