container: Make missing dbus module non-fatal
This is required to properly support Waydroid tool versions <=1.3.4 (which NixOS for example still has), or 1.4.0+ configured with USE_DBUS_ACTIVATION=0 (basically non-systemd distributions which can't supervise the container properly when it's launched via D-Bus)pull/73/head
parent
2f4f056fb1
commit
afa0180032
@ -1,7 +1,10 @@
|
||||
import dbus
|
||||
try:
|
||||
import dbus
|
||||
except ModuleNotFoundError:
|
||||
pass
|
||||
|
||||
def DBusContainerService(object_path="/ContainerManager", intf="id.waydro.ContainerManager"):
|
||||
return dbus.Interface(dbus.SystemBus().get_object("id.waydro.Container", object_path), intf)
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue