Commit 5a0567af authored by Guillaume Seguin's avatar Guillaume Seguin

Move import call to avoid worrying tracebacks when dbus is not available

parent 1733c4a2
......@@ -34,9 +34,8 @@ elif platform.system() == "Windows":
def deinhibit_sleep():
ctypes.windll.kernel32.SetThreadExecutionState(ctypes.c_int(ES_CONTINUOUS))
else:
import dbus
try:
import dbus
inhibit_sleep_handler = None
inhibit_sleep_token = None
bus = dbus.SessionBus()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment