diff options
| author | J08nY | 2017-08-11 20:29:28 +0200 |
|---|---|---|
| committer | J08nY | 2017-08-11 20:29:28 +0200 |
| commit | b6df3c3cdcb4ca25b48cc316502ec39482afe20e (patch) | |
| tree | b52d26b7a08c8aa127ff5ce477ac921dc80e576f /src/django_pgpmailman/models.py | |
| parent | 7b05d2311f3b1727d9567c21f6d9eaac518ef187 (diff) | |
| download | django-pgpmailman-b6df3c3cdcb4ca25b48cc316502ec39482afe20e.tar.gz django-pgpmailman-b6df3c3cdcb4ca25b48cc316502ec39482afe20e.tar.zst django-pgpmailman-b6df3c3cdcb4ca25b48cc316502ec39482afe20e.zip | |
Diffstat (limited to 'src/django_pgpmailman/models.py')
| -rw-r--r-- | src/django_pgpmailman/models.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/django_pgpmailman/models.py b/src/django_pgpmailman/models.py index f396e73..8b8dbdd 100644 --- a/src/django_pgpmailman/models.py +++ b/src/django_pgpmailman/models.py @@ -15,6 +15,9 @@ # # You should have received a copy of the GNU General Public License along with # this program. If not, see <http://www.gnu.org/licenses/>. + +from __future__ import absolute_import, unicode_literals + from itertools import chain from mailmanclient._client import RESTObject, MailingList @@ -30,7 +33,7 @@ class PGPMailingList(RESTObject): 'strip_original_sig', 'sign_outgoing', 'nonencrypted_msg_action', 'encrypt_outgoing', 'key_change_workflow', 'key_signing_allowed') _read_only_properties = ('self_link', 'list_id') - _properties = chain(_writable_properties, _read_only_properties) + _properties = list(chain(_writable_properties, _read_only_properties)) @property def mlist(self): @@ -40,7 +43,7 @@ class PGPMailingList(RESTObject): def key(self): try: response, content = self._connection.call(self._url + '/key') - key, _ = PGPKey.from_blob(response['key']) + key, _ = PGPKey.from_blob(content['key']) return key except PGPError: return None @@ -58,7 +61,7 @@ class PGPMailingList(RESTObject): def pubkey(self): try: response, content = self._connection.call(self._url + '/pubkey') - key, _ = PGPKey.from_blob(response['key']) + key, _ = PGPKey.from_blob(content['public_key']) return key except PGPError: return None |
