fixed regex matching of stderr

This commit is contained in:
Fredrik Eriksson 2020-12-21 18:36:20 +01:00
parent 2340a2f601
commit 46eed410f0
Signed by: feffe
GPG Key ID: F4329687B0FA7F8D
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ try:
except ImportError: except ImportError:
from distutils import setup from distutils import setup
version = '0.3.3' version = '0.3.4'
setup( setup(
name='zsnapper', name='zsnapper',

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 # 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 # if the script is run every minute and it takes more time than that to
# create all snapshots # 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):
pass pass
elif ctrl_proc.returncode != 0: elif ctrl_proc.returncode != 0:
raise ZFSSnapshotError('Failed to execute {}: {}'.format(cmd, err)) raise ZFSSnapshotError('Failed to execute {}: {}'.format(cmd, err))