second try

This commit is contained in:
Fredrik Eriksson 2020-12-21 18:41:13 +01:00
parent 46eed410f0
commit 2a91a41ede
Signed by: feffe
GPG Key ID: F4329687B0FA7F8D

View File

@ -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))