From 53ccab0f0a8f8c1d79968b277f5b2f687e657d3f Mon Sep 17 00:00:00 2001 From: Fredrik Eriksson Date: Fri, 10 May 2019 17:42:45 +0200 Subject: [PATCH] hopefully fixed crash when snapshotting failed --- bin/zsnapper | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/zsnapper b/bin/zsnapper index a22e895..471aeb0 100644 --- a/bin/zsnapper +++ b/bin/zsnapper @@ -348,12 +348,14 @@ def main(): ["{}@{}".format(x, remote) for x in remote_fs[remote]], remote_snapshots[remote], config) - except zsnaplib.ZFSSnapshotError: + except zsnaplib.ZFSSnapshotError as e: if remote in remote_fs: del remote_fs[remote] if remote in remote_snapshots: del remote_snapshots[remote] - log.warning("Failed to snapshot on {}".format(remote)) + if remote in remotes: + del remotes[remote] + log.warning("Failed to snapshot on {}: {}".format(remote, e)) ret = RET_CODES['ERROR'] for remote, filesystems in failed_remote_snapshots.items():