From 2a91a41ede9ac1b89bd1ae962e430f20efb8dc06 Mon Sep 17 00:00:00 2001 From: Fredrik Eriksson Date: Mon, 21 Dec 2020 18:41:13 +0100 Subject: [PATCH] second try --- zsnaplib/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsnaplib/__init__.py b/zsnaplib/__init__.py index 653695c..566e001 100644 --- a/zsnaplib/__init__.py +++ b/zsnaplib/__init__.py @@ -37,7 +37,7 @@ def do_zfs_command(args, zfs_cmd, pipecmd=None): # check if we try to create a snapshot that already exists. This can happen # if the script is run every minute and it takes more time than that to # create all snapshots - if ctrl_proc.returncode == 1 and re.match(re_err_ok, err): + if ctrl_proc.returncode == 1 and re.match(re_err_ok, err.decode('utf-8')): pass elif ctrl_proc.returncode != 0: raise ZFSSnapshotError('Failed to execute {}: {}'.format(cmd, err))