container: Make missing dbus module non-fatal #73
+5
-2
@@ -1,7 +1,10 @@
|
|||||||
import dbus
|
try:
|
||||||
|
import dbus
|
||||||
|
except ModuleNotFoundError:
|
||||||
|
pass
|
||||||
|
|
||||||
def DBusContainerService(object_path="/ContainerManager", intf="id.waydro.ContainerManager"):
|
def DBusContainerService(object_path="/ContainerManager", intf="id.waydro.ContainerManager"):
|
||||||
return dbus.Interface(dbus.SystemBus().get_object("id.waydro.Container", object_path), intf)
|
return dbus.Interface(dbus.SystemBus().get_object("id.waydro.Container", object_path), intf)
|
||||||
|
|
||||||
def DBusSessionService(object_path="/SessionManager", intf="id.waydro.SessionManager"):
|
def DBusSessionService(object_path="/SessionManager", intf="id.waydro.SessionManager"):
|
||||||
return dbus.Interface(dbus.SessionBus().get_object("id.waydro.Session", object_path), intf)
|
return dbus.Interface(dbus.SessionBus().get_object("id.waydro.Session", object_path), intf)
|
||||||
|
|||||||
Reference in New Issue
Block a user