summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/cgroup.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/cgroup.py b/examples/cgroup.py
index da222f9..8fa8457 100755
--- a/examples/cgroup.py
+++ b/examples/cgroup.py
@@ -121,9 +121,7 @@ def main() -> None:
# hierarchy is immediately writeable. For others, we may create a scope
# unit.
if ravel is not None:
- asyncio.get_event_loop().run_until_complete(
- start_transient_unit_with_ravel(os.getpid())
- )
+ asyncio.run(start_transient_unit_with_ravel(os.getpid()))
mycgroup = get_cgroup()
else:
# Re-execute ourselves via systemd-run.