aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/rest/lists.py
diff options
context:
space:
mode:
authorJ08nY2017-06-27 22:48:17 +0200
committerJ08nY2017-06-27 22:48:17 +0200
commita3c44b197c84b43a7fa76c3f2c20eddd6ae7dc9f (patch)
treea74d018edbc0613cff2a4af3ffa5fca904f2a26a /src/mailman_pgp/rest/lists.py
parentd9863d91ba8be95f432830d8ac53baf8e50cf7c7 (diff)
downloadmailman-pgp-a3c44b197c84b43a7fa76c3f2c20eddd6ae7dc9f.tar.gz
mailman-pgp-a3c44b197c84b43a7fa76c3f2c20eddd6ae7dc9f.tar.zst
mailman-pgp-a3c44b197c84b43a7fa76c3f2c20eddd6ae7dc9f.zip
Diffstat (limited to 'src/mailman_pgp/rest/lists.py')
-rw-r--r--src/mailman_pgp/rest/lists.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mailman_pgp/rest/lists.py b/src/mailman_pgp/rest/lists.py
index 4cffa38..72fa7a4 100644
--- a/src/mailman_pgp/rest/lists.py
+++ b/src/mailman_pgp/rest/lists.py
@@ -80,8 +80,12 @@ class AListPubkey:
def on_get(self, request, response):
"""/lists/<list_id>/key"""
if self._mlist is None:
- return not_found()
+ return not_found(response)
else:
+ pubkey = self._mlist.pubkey
+ if pubkey is None:
+ return not_found(response)
+
resource = dict(public_key=str(self._mlist.pubkey),
key_fingerprint=str(
self._mlist.pubkey.fingerprint))