summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2024-07-14 15:59:26 +0100
committerJames Le Cuirot <chewi@gentoo.org>2024-07-14 16:02:16 +0100
commitd1d0c8739a14941dfe29af5da4ade30c547d59a5 (patch)
tree8810e455932b3bb8637ff5b9fb73df2e2bd4c941 /sec-keys
parentsec-keys/openpgp-keys-gentoo-developers: Min openpgp-keys-gentoo-auth version (diff)
downloadgentoo-d1d0c8739a14941dfe29af5da4ade30c547d59a5.tar.gz
gentoo-d1d0c8739a14941dfe29af5da4ade30c547d59a5.tar.bz2
gentoo-d1d0c8739a14941dfe29af5da4ade30c547d59a5.zip
sec-keys/openpgp-keys-gentoo-developers: Add check to ensure any keys were found
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'sec-keys')
-rw-r--r--sec-keys/openpgp-keys-gentoo-developers/files/keyring-mangler.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sec-keys/openpgp-keys-gentoo-developers/files/keyring-mangler.py b/sec-keys/openpgp-keys-gentoo-developers/files/keyring-mangler.py
index 90b4ff68357e..81e7886af56e 100644
--- a/sec-keys/openpgp-keys-gentoo-developers/files/keyring-mangler.py
+++ b/sec-keys/openpgp-keys-gentoo-developers/files/keyring-mangler.py
@@ -91,5 +91,8 @@ for key in gpg.list_keys(sigs=True):
good_keys.append(key["fingerprint"])
+if len(good_keys) <= len(AUTHORITY_KEYS):
+ raise RuntimeError("No valid developer keys were found!")
+
with open(armored_output, "w", encoding="utf8") as keyring:
keyring.write(gpg.export_keys(good_keys))