--close-running closes the app instead of restarting it, so the dev launch documented in the README and .vscode/launch.json (python3 main.py --devel --data data --close-running) ends with nothing running.
quit_running() asks the running instance to quit with Activate("quit", [], []). The instance drops off the bus while quitting, so it never sends a method reply and dbus-python raises org.freedesktop.DBus.Error.NoReply: Remote peer disconnected. That disconnect is the expected outcome of a successful quit, but it was logged as an error and followed by sys.exit(0) — so the time.sleep(5) and the startup after it never ran.
Before
INFO Closing running instance
ERROR Could not close running instance: org.freedesktop.DBus.Error.NoReply: Remote peer disconnected
Old instance gone, no new instance, decks left unmanaged.
After
INFO Closing running instance
INFO Running instance closed
INFO Loaded page VSCode on deck <serial>
One command: the old instance quits and the new one starts. Verified against real hardware with the app running.
A second change in the same handler
Any other DBusException previously fell through the unmatched if and was swallowed, letting startup continue while the old instance may still have been holding the decks. Those now log and exit non-zero, on the grounds that a second instance fighting over the same hardware is worse than a clear failure. Happy to drop this half if you would rather keep the diff to the NoReply branch alone.
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
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.
--close-running closes the app instead of restarting it, so the dev launch documented in the README and .vscode/launch.json (python3 main.py --devel --data data --close-running) ends with nothing running.
quit_running() asks the running instance to quit with Activate("quit", [], []). The instance drops off the bus while quitting, so it never sends a method reply and dbus-python raises org.freedesktop.DBus.Error.NoReply: Remote peer disconnected. That disconnect is the expected outcome of a successful quit, but it was logged as an error and followed by sys.exit(0) — so the time.sleep(5) and the startup after it never ran.
Before
Old instance gone, no new instance, decks left unmanaged.
After
One command: the old instance quits and the new one starts. Verified against real hardware with the app running.
A second change in the same handler
Any other DBusException previously fell through the unmatched if and was swallowed, letting startup continue while the old instance may still have been holding the decks. Those now log and exit non-zero, on the grounds that a second instance fighting over the same hardware is worse than a clear failure. Happy to drop this half if you would rather keep the diff to the NoReply branch alone.
🤖 Generated with Claude Code