diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/zfssnap/zfssnap.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/zfssnap/zfssnap.py b/modules/zfssnap/zfssnap.py index 6daf11ff..1c3e1f9a 100644 --- a/modules/zfssnap/zfssnap.py +++ b/modules/zfssnap/zfssnap.py | |||
@@ -233,11 +233,12 @@ def autosnap(): | |||
233 | do_snapshot(*single) | 233 | do_snapshot(*single) |
234 | if recursive: | 234 | if recursive: |
235 | do_snapshot(*recursive, recursive=True) | 235 | do_snapshot(*recursive, recursive=True) |
236 | if not single and not recursive: | ||
237 | logger.warning('No snapshots to create') | ||
236 | for snap in all_snap_names: | 238 | for snap in all_snap_names: |
237 | logger.info(f'Created ‘{snap}’') | 239 | logger.info(f'Created ‘{snap}’') |
238 | else: | 240 | if all_snap_names: |
239 | logger.warn('No snapshots to create') | 241 | rename(snapshots=all_snap_names) |
240 | rename(snapshots=all_snap_names) | ||
241 | 242 | ||
242 | def main(): | 243 | def main(): |
243 | global logger | 244 | global logger |