Block the error handler dialog in test mode

This commit is contained in:
Veronica K. B. Olsen
2020-08-02 15:14:46 +02:00
parent 46c9f0fb5f
commit d3ab1caf3a
2 changed files with 6 additions and 2 deletions
+6 -1
View File
@@ -77,13 +77,16 @@ def exceptionHandler(exType, exValue, exTrace):
"""
import logging
from traceback import print_tb, format_tb
from nw import __issuesurl__
from nw import CONFIG
from PyQt5.QtWidgets import qApp, QApplication, QErrorMessage, QMessageBox
logger = logging.getLogger(__name__)
logger.error("%s: %s" % (exType.__name__, str(exValue)))
print_tb(exTrace)
if not CONFIG.showGUI:
return
try:
nwGUI = None
for qWin in qApp.topLevelWidgets():
@@ -104,3 +107,5 @@ def exceptionHandler(exType, exValue, exTrace):
except Exception as e:
logger.error(str(e))
return
-1
View File
@@ -432,7 +432,6 @@ class GuiBuildNovel(QDialog):
def _buildPreview(self):
"""Build a preview of the project in the document viewer.
"""
# Get Settings
fmtTitle = self.fmtTitle.text().strip()
fmtChapter = self.fmtChapter.text().strip()