Fix pyinstaller build

Fix exception when PyQt is not installed
This commit is contained in:
Timmy Welch 2023-10-07 11:49:08 -07:00
parent 4b93262d5f
commit 96c5c4aa28
3 changed files with 6 additions and 3 deletions

View File

@ -82,13 +82,14 @@ try:
return True
return super().event(event)
except ImportError:
except ImportError as e:
def show_exception_box(log_msg: str) -> None:
...
logger.exception("Qt unavailable")
qt_available = False
import_error = e
def open_tagger_window(

View File

@ -217,6 +217,8 @@ class App:
try:
from comictaggerlib import gui
if not gui.qt_available:
raise gui.import_error
return gui.open_tagger_window(talkers, self.config, error)
except ImportError:
self.config[0].Runtime_Options_no_gui = True

View File

@ -221,7 +221,7 @@ depends =
clean
pypi-upload
deps =
pyinstaller>=5.6.2
pyinstaller>=5.6.2,!=6.0.0
extras =
all
commands =
@ -281,7 +281,7 @@ deps =
types-setuptools
types-requests
build
pyinstaller>=5.6.2
pyinstaller>=5.6.2,!=6.0.0
[flake8]
max-line-length = 120