diff --git a/nw/error.py b/nw/error.py index cb276752..0301f3ba 100644 --- a/nw/error.py +++ b/nw/error.py @@ -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 diff --git a/nw/gui/build.py b/nw/gui/build.py index 34a01f05..93aa8271 100644 --- a/nw/gui/build.py +++ b/nw/gui/build.py @@ -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()