Skip to content

Commit

Permalink
Safe guard dbus import
Browse files Browse the repository at this point in the history
  • Loading branch information
MattHag committed May 16, 2024
1 parent 50a42ab commit b13b783
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/logitech_receiver/diversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
from typing import Dict
from typing import Tuple

import dbus
import gi
import psutil

Expand Down Expand Up @@ -188,6 +187,8 @@ def gnome_dbus_interface_setup():
if _dbus_interface is not None:
return _dbus_interface
try:
import dbus

bus = dbus.SessionBus()
remote_object = bus.get_object("org.gnome.Shell", "/io/github/pwr_solaar/solaar")
_dbus_interface = dbus.Interface(remote_object, "io.github.pwr_solaar.solaar")
Expand Down

0 comments on commit b13b783

Please sign in to comment.