Print backtrace on console when we are not running a py2exe/py2app build

This commit is contained in:
Arjen Hiemstra 2015-08-19 19:13:44 +02:00
parent 792c3426f8
commit 79bd590656

View File

@ -7,9 +7,11 @@ from PyQt5.QtCore import QT_VERSION_STR, PYQT_VERSION_STR, QCoreApplication
from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QLabel, QTextEdit
def show(type, value, tb):
if not hasattr(sys, "frozen"):
traceback.print_exception(type, value, tb)
application = QCoreApplication.instance()
if not application:
traceback.print_exception(type, value, tb)
sys.exit(1)
dialog = QDialog()