diff options
author | Helmut Grohne <helmut@subdivi.de> | 2024-04-19 05:32:22 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2024-04-19 05:32:22 +0200 |
commit | eaca5f3629f6eb90b9257d6abdb2207cf930aad5 (patch) | |
tree | 8485e00a9370b8a6b16bd2edb299bbb805768f31 /examples | |
parent | a75ebb7c6b558feb9a3b93ace6cbca54bccb067a (diff) | |
download | python-linuxnamespaces-eaca5f3629f6eb90b9257d6abdb2207cf930aad5.tar.gz |
examples/cgroup.py: use asyncio.run
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/cgroup.py | 4 |
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. |