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:
continue
except Exception as e:
print("Error loading %s: %s (in quirks.py)" % (os.path.basename(name), e))
msgbox = QtWidgets.QMessageBox()
msgbox.setWindowTitle("Error!")
msgbox.setText("Error loading %s: %s (in quirks.py)" % (os.path.basename(filename), e))
msgbox.exec_()
PchumLog.warning("Error loading %s: %s (in quirks.py)" % (os.path.basename(name), e))
#msgbox = QtWidgets.QMessageBox()
#msgbox.setWindowTitle("Error!")
#msgbox.setText("Error loading %s: %s (in quirks.py)" % (os.path.basename(filename), e))
#msgbox.exec_()
else:
if self.modHas(module, 'setup'):
module.setup()