Can't use QtWidgets.QMessageBox() this early

This commit is contained in:
Dpeta 2022-03-18 01:35:47 +00:00
parent 8e9b696a1c
commit 862af2c849

View file

@ -72,11 +72,11 @@ class ScriptQuirks(object):
if module is None: if module is None:
continue continue
except Exception as e: except Exception as e:
print("Error loading %s: %s (in quirks.py)" % (os.path.basename(name), e)) PchumLog.warning("Error loading %s: %s (in quirks.py)" % (os.path.basename(name), e))
msgbox = QtWidgets.QMessageBox() #msgbox = QtWidgets.QMessageBox()
msgbox.setWindowTitle("Error!") #msgbox.setWindowTitle("Error!")
msgbox.setText("Error loading %s: %s (in quirks.py)" % (os.path.basename(filename), e)) #msgbox.setText("Error loading %s: %s (in quirks.py)" % (os.path.basename(filename), e))
msgbox.exec_() #msgbox.exec_()
else: else:
if self.modHas(module, 'setup'): if self.modHas(module, 'setup'):
module.setup() module.setup()