Don't try and use a empty config path for startup scripts

Fix #9205
This commit is contained in:
Marek Roszko 2021-09-22 21:03:34 -04:00
parent 1463c9ab01
commit 67d24e8b00
1 changed files with 29 additions and 25 deletions

View File

@ -39,6 +39,7 @@ class KiCadPyShell(KiCadEditorNotebookFrame):
KiCadEditorNotebookFrame.__init__(self, parent)
def _setup_startup(self):
if self.config_dir != "":
"""Initialise the startup script."""
# Create filename for startup script.
self.startup_file = os.path.join(self.config_dir,
@ -65,6 +66,9 @@ class KiCadPyShell(KiCadEditorNotebookFrame):
default_startup.close()
except:
pass
else:
self.startup_file = ""
self.execStartupScript = False
def _setup(self):
"""