From b9d5341b057f32f79058ac4e7a3a0912179d7931 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 20 Feb 2022 21:59:09 +0100 Subject: zfssnap: ... --- modules/zfssnap/zfssnap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/zfssnap/zfssnap.py b/modules/zfssnap/zfssnap.py index f82810b9..d524f5db 100644 --- a/modules/zfssnap/zfssnap.py +++ b/modules/zfssnap/zfssnap.py @@ -261,7 +261,9 @@ def autosnap(): if not tasks: logger.warning('No snapshots to create') else: - asyncio.run(await asyncio.gather(*tasks)) + async def run_tasks(): + await asyncio.gather(*tasks) + asyncio.run(run_tasks()) for snap in all_snap_names: logger.info(f'Created ‘{snap}’') if all_snap_names: -- cgit v1.2.3