From ca76cb2af3f0ef62039b8efb6d35c547c560c6f9 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Wed, 20 Apr 2022 17:15:55 +0200 Subject: [PATCH] Make a couple of random, minor fixes --- novelwriter/config.py | 8 ++++---- novelwriter/error.py | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/novelwriter/config.py b/novelwriter/config.py index c5159493..7fb334c2 100644 --- a/novelwriter/config.py +++ b/novelwriter/config.py @@ -978,12 +978,12 @@ class Config: """ try: import enchant # noqa: F401 - self.hasEnchant = True - logger.debug("Checking package 'pyenchant': OK") - except Exception: + except ImportError: self.hasEnchant = False logger.debug("Checking package 'pyenchant': Missing") - + else: + self.hasEnchant = True + logger.debug("Checking package 'pyenchant': OK") return # END Class Config diff --git a/novelwriter/error.py b/novelwriter/error.py index 0dec56e8..2ceae1e3 100644 --- a/novelwriter/error.py +++ b/novelwriter/error.py @@ -87,6 +87,8 @@ class NWErrorMessage(QDialog): self.mainBox.addWidget(self.btnBox, 2, 0, 1, 2) self.mainBox.setSpacing(16) + # Pick a random window title from a set of error messages by + # Hex, the computer, from Discworld self.setWindowTitle([ "+++ Out of Cheese Error +++", "+++ Divide by Cucumber Error +++",