fix logging of snapshot errors

This commit is contained in:
Fredrik Eriksson 2021-05-25 17:44:07 +02:00
parent 1290623456
commit b0758a6b8b
Signed by: feffe
GPG Key ID: F4329687B0FA7F8D

View File

@ -369,9 +369,9 @@ def main():
try: try:
if remote in remote_snapshots: if remote in remote_snapshots:
remote_snapshots[remote] = zsnaplib.get_snapshots(zfs_cmd) remote_snapshots[remote] = zsnaplib.get_snapshots(zfs_cmd)
except zsnaplib.ZFSSnapshotError: except zsnaplib.ZFSSnapshotError as e:
del remote_snapshots[remote] del remote_snapshots[remote]
log.warning("Could not refresh snapshots on {}".format(remote)) log.warning("Could not refresh snapshots on {}: {}".format(remote, e))
snapshots = zsnaplib.get_snapshots(local_zfs_cmd) snapshots = zsnaplib.get_snapshots(local_zfs_cmd)
failed_send = send_snapshots(fslist, snapshots, config) failed_send = send_snapshots(fslist, snapshots, config)