Solaar/lib
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
..
hid_parser Fix duplicate class field typo in HID parser data 2026-05-05 14:43:03 -04:00
hidapi hidapi: look for the unsuffixed libhidapi.so 2026-08-01 11:29:46 -07:00
keysyms keysymdef: Rename key symbols 2024-10-11 07:42:38 -04:00
logitech_receiver diversion: do not name dbus in the handler that guards importing it 2026-08-01 11:29:46 -07:00
solaar dbus: do not use the bus in watch_suspend_resume when there is none 2026-08-01 11:29:46 -07:00