diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2021-08-18 09:47:47 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2021-08-18 09:47:47 -0400 |
commit | 373c2b890dc41d2e6b0803ea90c4cdb1d14d8d98 (patch) | |
tree | c0b977f831d1d14cfc2b6dcd8699ae3e80bd64bd | |
parent | e5e79d0a7e4b86c891c425913b8d0da80b341bb5 (diff) | |
download | grokmirror-373c2b890dc41d2e6b0803ea90c4cdb1d14d8d98.tar.gz |
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>
-rwxr-xr-x | grokmirror/fsck.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/grokmirror/fsck.py b/grokmirror/fsck.py index 7e64518..0820451 100755 --- a/grokmirror/fsck.py +++ b/grokmirror/fsck.py @@ -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 |