aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2020-11-29 15:23:21 +0100
committerPapoteur <papoteur@mageia.org>2020-11-29 15:23:21 +0100
commit4901ebca8670f6c3be75a7692f8d7c9870a002b4 (patch)
tree6c74fd1f953f5b4370589f7caf24371fb32ec815
parentd4d4cba0dcbedf18ad8c35ffc515a485daf029cc (diff)
downloadisodumper-4901ebca8670f6c3be75a7692f8d7c9870a002b4.tar
isodumper-4901ebca8670f6c3be75a7692f8d7c9870a002b4.tar.gz
isodumper-4901ebca8670f6c3be75a7692f8d7c9870a002b4.tar.bz2
isodumper-4901ebca8670f6c3be75a7692f8d7c9870a002b4.tar.xz
isodumper-4901ebca8670f6c3be75a7692f8d7c9870a002b4.zip
Test if Mageia key is already present
-rwxr-xr-xbackend/raw_write.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/backend/raw_write.py b/backend/raw_write.py
index 58417f9..30b658c 100755
--- a/backend/raw_write.py
+++ b/backend/raw_write.py
@@ -127,6 +127,7 @@ class Dumper(object):
def _get_sum(self, source):
self.return_state = False
+ mageia_keyid = "835E41F4EDCA7A90"
logging.debug("Starting getting sum")
# Check if the sum file has a valid signature
gpg = gnupg.GPG()
@@ -136,7 +137,11 @@ class Dumper(object):
sig_file = "{}.{}.gpg".format(source, self.sum_type)
self.source_file = "{}.{}".format(source, self.sum_type)
try:
- gpg.recv_keys('pool.sks-keyservers.net', 'EDCA7A90')
+ keys_list = gpg.list_keys()
+ if mageia_keyid in [entry['keyid'] for entry in keys_list]:
+ logging.info("Mageia key already present")
+ else:
+ gpg.recv_keys('pool.sks-keyservers.net', mageia_keyid)
self.sum_check_searched = True
with open(sig_file, 'rb') as g:
self.signature_found = True