diff --git a/zfs-snapshot-backup.py b/zfs-snapshot-backup.py index 1e51db4..38a1869 100644 --- a/zfs-snapshot-backup.py +++ b/zfs-snapshot-backup.py @@ -13,9 +13,9 @@ ZFS_ELAB_PREFIX = "elabfs-" TMP_BACKUP_FOLDER = "/mnt/Datenspeicher/snap-backup-dataset/temporary-backups" -def call(arguments): +def call(arguments, as_text=False): result = subprocess.run( - arguments, check=True, capture_output=True, text=True + arguments, check=True, stdout=subprocess.PIPE, universal_newlines=as_text ) return result.stdout @@ -23,7 +23,7 @@ def call(arguments): def remote_call(arguments): cmd = ["ssh", "-i", SSH_KEY_FILE, SSH_REMOTE] cmd.extend(arguments) - return call(cmd) + return call(cmd, as_text=True) def clean_split(text):