qtvcp: fix undefined name in gcode_editor QScintilla import fallback#4182
Open
grandixximo wants to merge 1 commit into
Open
qtvcp: fix undefined name in gcode_editor QScintilla import fallback#4182grandixximo wants to merge 1 commit into
grandixximo wants to merge 1 commit into
Conversation
The PyQt5 branch of the QScintilla import fallback caught ImportError without binding it (no 'as e') but then passed exc_info=e to LOG.critical, raising NameError. Because sys.excepthook is installed at qtvcp startup and pops a modal error dialog, that NameError turns a missing python3-pyqt5.qsci into an indefinite hang (the dialog blocks forever under headless/CI) instead of a clean exit. Bind the exception as e and sys.exit(1), matching the PyQt6 branch below.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The PyQt5 branch of the QScintilla import fallback in
gcode_editor.pycaughtImportErrorwithout binding it (as e), then passedexc_info=etoLOG.critical, raisingNameError. Since qtvcp installs a modal-dialogsys.excepthookat startup, that turns a missingpython3-pyqt5.qsciinto an indefinite hang under headless/CI (the dialog blocks forever, the GUI never reaches its event loop or honors SIGTERM) instead of a clean exit.Fix binds the exception and
sys.exit(1), matching the PyQt6 branch below it.Verified on Fedora 43 / Python 3.14.5 with
python3-qscintilla-qt5removed: before,qtdragon-quithangs (GUI still alive 15s after SIGTERM); after, it logs the actionable message and exits in ~6s.