diff options
Diffstat (limited to 'linuxnamespaces/systemd')
-rw-r--r-- | linuxnamespaces/systemd/dbussy.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/linuxnamespaces/systemd/dbussy.py b/linuxnamespaces/systemd/dbussy.py index 77410df..47c375a 100644 --- a/linuxnamespaces/systemd/dbussy.py +++ b/linuxnamespaces/systemd/dbussy.py @@ -72,10 +72,15 @@ async def start_transient_unit( """ bus = await ravel.session_bus_async() with SystemdJobWaiter(bus) as wait: + systemd1 = bus["org.freedesktop.systemd1"]["/org/freedesktop/systemd1"] result = await wait( - bus["org.freedesktop.systemd1"]["/org/freedesktop/systemd1"] - .get_interface("org.freedesktop.systemd1.Manager") - .StartTransientUnit(unitname, "fail", properties, [])[0], + ( + await ( + await systemd1.get_async_interface( + "org.freedesktop.systemd1.Manager" + ) + ).StartTransientUnit(unitname, "fail", properties, []) + )[0], ) if result != "done": raise OSError("StartTransientUnit failed: " + result) |