Fix crash on trying to remove repository we never fsck'd
If a repository is gone from manifest before we evern managed to fsck
it, we may get a crash on trying to remove it from status.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
diff --git a/grokmirror/fsck.py b/grokmirror/fsck.py
index d56895c..96daf17 100755
--- a/grokmirror/fsck.py
+++ b/grokmirror/fsck.py
@@ -667,7 +667,10 @@
if not os.path.isdir(fullpath):
# Remove it from manifest and status
manifest.pop(gitdir)
- status.pop(fullpath)
+ try:
+ status.pop(fullpath)
+ except KeyError:
+ pass
changed = True
continue