aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/model
diff options
context:
space:
mode:
authorJ08nY2017-06-19 22:04:58 +0200
committerJ08nY2017-06-19 22:04:58 +0200
commit625d264965f91dfefd301b361524d13b64901c7a (patch)
treee153761ab7b01ba7cb5f99f1ab3cf081ffb050fb /src/mailman_pgp/model
parent1cc2710aa47159fc7b235f529f889fbcf5afc29f (diff)
downloadmailman-pgp-625d264965f91dfefd301b361524d13b64901c7a.tar.gz
mailman-pgp-625d264965f91dfefd301b361524d13b64901c7a.tar.zst
mailman-pgp-625d264965f91dfefd301b361524d13b64901c7a.zip
Diffstat (limited to 'src/mailman_pgp/model')
-rw-r--r--src/mailman_pgp/model/list.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mailman_pgp/model/list.py b/src/mailman_pgp/model/list.py
index 764dc1b..521867c 100644
--- a/src/mailman_pgp/model/list.py
+++ b/src/mailman_pgp/model/list.py
@@ -60,7 +60,7 @@ class EncryptedMailingList(Base):
if self._key is None:
# Check the file
if exists(self.key_path) and isfile(self.key_path):
- self._key = PGPKey.from_file(self.key_path)
+ self._key, _ = PGPKey.from_file(self.key_path)
else:
# Check if key generator is running or what? Restart it if not.
# If we race it shutting down and saving the key file
@@ -71,6 +71,12 @@ class EncryptedMailingList(Base):
return self._key
@property
+ def pubkey(self):
+ if self.key is None:
+ return None
+ return self.key.pubkey
+
+ @property
def key_path(self):
return join(config.pgp.keydir_config['list_keydir'],
self.list_id + '.asc')