diff options
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 |
