Solaar/lib/solaar
Nick Price 9da66068dc
dbus: do not use the bus in watch_suspend_resume when there is none
The guard read

    if bus is not None and on_resume_callback is not None or on_suspend_callback is not None:

which parses as

    (bus is not None and on_resume_callback is not None) or (on_suspend_callback is not None)

so a caller passing on_suspend_callback entered the body regardless of
whether the bus exists, and bus.add_signal_receiver() raised AttributeError
on None. gtk.py passes both callbacks under --restart-on-wake-up, so that
option crashed on any system without a running system dbus. Test the bus
separately and return early.

The success message was also logged even when no bus was connected.
2026-08-01 11:29:46 -07:00
..
cli cli: close devices before shutdown in show 2026-07-02 09:22:32 -04:00
ui perkey: add PRO X RAPID media top row layout 2026-07-31 16:34:42 -04:00
__init__.py Fix warnings from automatic code inspections 2024-10-11 07:42:38 -04:00
configuration.py config: tolerate devices with no unitId 2026-02-05 10:50:49 -05:00
custom_logger.py Introduce custom logger 2025-01-02 07:56:46 -05:00
dbus.py dbus: do not use the bus in watch_suspend_resume when there is none 2026-08-01 11:29:46 -07:00
gtk.py docs: update help messages for CLI commands 2025-12-21 18:03:53 -05:00
i18n.py Unsupported locale: Fall back to English (#2891) 2025-09-08 09:44:45 -04:00
listener.py G522 LIGHTSPEED headphones support 2026-05-21 10:13:00 -04:00
tasks.py solaar: Remove outdated logger enabled checks 2025-01-02 09:26:31 -05:00
version release 1.1.20 2026-06-28 09:55:10 -04:00