[projects/pld-ftp-admin] Don't crash on missing file.
arekm
arekm at pld-linux.org
Sun Mar 29 03:22:26 CEST 2026
commit 305152a69ded1e4e476115995a4318c031545ffb
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sun Mar 29 03:22:06 2026 +0200
Don't crash on missing file.
wwwbin/no-digest-packages.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/wwwbin/no-digest-packages.py b/wwwbin/no-digest-packages.py
index c1376c1..0f3f753 100755
--- a/wwwbin/no-digest-packages.py
+++ b/wwwbin/no-digest-packages.py
@@ -75,7 +75,10 @@ ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES | rpm._RPMVSF_NODIGESTS)
# Replaces: rpm --install --test --nodeps --justdb <file>
# and checking stderr for "does not verify: no digest"
def has_no_digest(rpm_file):
- fd = rpm.fd.open(rpm_file)
+ try:
+ fd = rpm.fd.open(rpm_file)
+ except OSError:
+ return False
try:
h = ts.hdrFromFdno(fd)
except rpm.error:
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/pld-ftp-admin.git/commitdiff/305152a69ded1e4e476115995a4318c031545ffb
More information about the pld-cvs-commit
mailing list