From 51183dff448079b64001479b13f1cb386e520e3a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 19 Feb 2022 15:58:13 +0100 Subject: zfssnap: ... --- modules/zfssnap/zfssnap.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/zfssnap/zfssnap.py b/modules/zfssnap/zfssnap.py index 76a7727c..6daf11ff 100644 --- a/modules/zfssnap/zfssnap.py +++ b/modules/zfssnap/zfssnap.py @@ -229,10 +229,14 @@ def autosnap(): _log_cmd(*args) subprocess.run(args, check=True) - do_snapshot(*single) - do_snapshot(*recursive, recursive=True) + if single: + do_snapshot(*single) + if recursive: + do_snapshot(*recursive, recursive=True) for snap in all_snap_names: logger.info(f'Created ‘{snap}’') + else: + logger.warn('No snapshots to create') rename(snapshots=all_snap_names) def main(): -- cgit v1.2.3