~monsieuricon/grokmirror

373c2b890dc41d2e6b0803ea90c4cdb1d14d8d98 — Konstantin Ryabitsev 11 months ago e5e79d0
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>
1 files changed, 4 insertions(+), 1 deletions(-)

M grokmirror/fsck.py
M grokmirror/fsck.py => grokmirror/fsck.py +4 -1
@@ 593,7 593,10 @@ def fsck_mirror(config, force=False, repack_only=False, conn_only=False,
        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