aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/rest/lists.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman_pgp/rest/lists.py')
-rw-r--r--src/mailman_pgp/rest/lists.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mailman_pgp/rest/lists.py b/src/mailman_pgp/rest/lists.py
index 312661b..7c73364 100644
--- a/src/mailman_pgp/rest/lists.py
+++ b/src/mailman_pgp/rest/lists.py
@@ -12,7 +12,6 @@ class _EncryptedBase(CollectionMixin):
def _resource_as_dict(self, emlist):
"""See `CollectionMixin`."""
return dict(list_id=emlist.list_id,
- key_fingerprint=emlist.key_fingerprint,
unsigned_msg_action=emlist.unsigned_msg_action,
nonencrypted_msg_action=emlist.nonencrypted_msg_action,
strip_original_signature=emlist.strip_original_signature,
@@ -30,7 +29,7 @@ class _EncryptedBase(CollectionMixin):
class AllEncryptedLists(_EncryptedBase):
def on_get(self, request, response):
"""/lists"""
- resource = self._make_collection(response)
+ resource = self._make_collection(request)
return okay(response, etag(resource))
@@ -62,5 +61,7 @@ class AListPubkey:
if self._mlist is None:
return not_found()
else:
- resource = dict(public_key=self._mlist.pubkey)
+ resource = dict(public_key=str(self._mlist.pubkey),
+ key_fingerprint=str(
+ self._mlist.pubkey.fingerprint))
return okay(response, etag(resource))