Skip to content

Commit

Permalink
DBusHelper can throw a 'dbus.exceptions.DBusException'
Browse files Browse the repository at this point in the history
and we don't want to import dbus here to match the specific exception type,
so let the linters whine about it
  • Loading branch information
totaam committed May 10, 2024
1 parent 455860c commit 3d647b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xpra/platform/posix/keyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ def init_vars(self) -> None:
self.__input_sources: dict[str, int] = {}
try:
self.__dbus_helper = DBusHelper()
except ImportError as e:
# we really want to catch `dbus.exceptions.DBusException` here instead:
except Exception as e:
self.__dbus_helper = None
log.info(f"gnome input sources requires dbus: {e}")
else:
Expand Down

0 comments on commit 3d647b4

Please sign in to comment.