Skip to content

wxGUI/watchdog: Split GISRC lines on the first colon only - #8110

Open
alteralto wants to merge 1 commit into
OSGeo:mainfrom
alteralto:fix-8096-gisrc-colon
Open

alteralto wants to merge 1 commit into
OSGeo:mainfrom
alteralto:fix-8096-gisrc-colon

Conversation

@alteralto

Copy link
Copy Markdown

CurrentMapsetWatch.on_modified read GISRC with line.split(":"), which raises ValueError as soon as a value holds a colon. On Windows that is the usual case, GISDBASE: C:\..., so the watcher thread died there on the first change to GISRC and the Data panel stopped noticing mapset changes. A blank line raised as well.

GISRC lines are now split on the first colon, as read_gisrc in lib/init/grass.py and the other GISRC readers do, and lines without a colon are skipped.

Tested on Windows with wxPython 4.3.2 and watchdog 6.0.0: calling CurrentMapsetWatch.on_modified on a GISRC whose GISDBASE is C:\grassdata raises ValueError: too many values to unpack on main, and posts the mapset change with this fix. I didn't add a test to the repository: the wxGUI code has no pytest suite, and the pytest workflow doesn't install wxPython.

Fixes #8096

@github-actions github-actions Bot added GUI wxGUI related Python Related code is in Python labels Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GUI wxGUI related Python Related code is in Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Unhandled ValueError terminates watchdog thread when GISRC value contains multiple colons

1 participant