aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2022-04-26 12:31:34 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2022-04-26 12:31:34 -0400
commitef2bec9db7f633b50558fb82b3c04e7a3addfe6e (patch)
tree211e26e44955dba6925819401567923012d0bd7e
parent7d92b25a26a7c7e964f296b4a364c55fcb8637d1 (diff)
downloadkorg-helpers-ef2bec9db7f633b50558fb82b3c04e7a3addfe6e.tar.gz
Treat failures to uncompress as non-fatal
We shouldn't crash out if we got a corrupted download. This script is looking specifically at bad signatures -- a download that won't even properly uncompress is probably not trying to sneak in badness. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rwxr-xr-xsig-prover.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/sig-prover.py b/sig-prover.py
index 4e00b77..447f41c 100755
--- a/sig-prover.py
+++ b/sig-prover.py
@@ -320,8 +320,12 @@ def verify_tarball(config, turl):
cmdargs = [zbin, contentfile]
ecode, out, err = _run_command(cmdargs)
if ecode > 0:
- logger.critical('Error uncompressing %s', turl)
- sys.exit(1)
+ # Failure to uncompress is not a critical failure, because
+ # this could be the result of any number of things: bad cache,
+ # errors during transmission, etc. We don't care for such
+ # situations -- we are looking specifically at bad signatures.
+ logger.info('Failed uncompressing %s')
+ return
contentfile = os.path.join(td, 'content')
gpgargs = ['--verify', '--status-fd=2', signfile, contentfile]
keyring = os.path.join(config.get('keyringdir'), config.get('keyring'))