Core, Gui: allow breakpoints in Init.py and InitGui.py of mods

This commit is contained in:
bdieterm
2023-09-09 12:59:11 +02:00
committed by wwmayer
parent 0d39450d29
commit c9a802418a
2 changed files with 4 additions and 4 deletions

View File

@@ -178,8 +178,8 @@ def InitApplications():
InstallFile = os.path.join(Dir,"Init.py")
if (os.path.exists(InstallFile)):
try:
with open(file=InstallFile, encoding="utf-8") as f:
exec(f.read())
with open(InstallFile, 'rt', encoding='utf-8') as f:
exec(compile(f.read(), InstallFile, 'exec'))
except Exception as inst:
Log('Init: Initializing ' + Dir + '... failed\n')
Log('-'*100+'\n')

View File

@@ -132,8 +132,8 @@ def InitApplications():
InstallFile = os.path.join(Dir,"InitGui.py")
if os.path.exists(InstallFile):
try:
with open(file=InstallFile, encoding="utf-8") as f:
exec(f.read())
with open(InstallFile, 'rt', encoding='utf-8') as f:
exec(compile(f.read(), InstallFile, 'exec'))
except Exception as inst:
Log('Init: Initializing ' + Dir + '... failed\n')
Log('-'*100+'\n')