From 9c99dec8813db2db84eb4fb2e35ea85fadea892c Mon Sep 17 00:00:00 2001 From: root Date: Wed, 7 Aug 2019 14:40:53 +0200 Subject: [PATCH] bugfixes --- zfs-snapshot-backup.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zfs-snapshot-backup.py b/zfs-snapshot-backup.py index 38a1869..f3a6d77 100644 --- a/zfs-snapshot-backup.py +++ b/zfs-snapshot-backup.py @@ -27,13 +27,13 @@ def remote_call(arguments): def clean_split(text): - items = (item.strip() for item in text.split) + items = (item.strip() for item in text.split()) return [item for item in items if item] def list_snapshots(): cmd = ["zfs", "list", "-t", "snapshot", "-H", "-o", "name", "-r", ZFS_POOL] - return clean_split(call(cmd)) + return clean_split(call(cmd, as_text=True)) def elab_snapshots(): @@ -124,4 +124,5 @@ def create_backups(): if __name__ == "__main__": - create_backups() + es = elab_snapshots() + print(list_remote_backups(es.keys())