[py3k] fix cubicweb.mail.parse_message_id
authorJulien Cristau <julien.cristau@logilab.fr>
Mon, 21 Dec 2015 15:52:41 +0100
changeset 11012 739943455c9d
parent 11011 94bbf6d7eaf8
child 11013 645fcb5bcc39
[py3k] fix cubicweb.mail.parse_message_id base64.b64decode returns bytes. Fixes sobjects/test/unittest_notification.py.
mail.py
--- a/mail.py	Mon Dec 21 15:46:36 2015 +0100
+++ b/mail.py	Mon Dec 21 15:52:41 2015 +0100
@@ -69,7 +69,7 @@
     try:
         values, qualif = msgid.split('@')
         padding = len(values) % 4
-        values = b64decode(str(values + '='*padding), '.-')
+        values = b64decode(str(values + '='*padding), '.-').decode('ascii')
         values = dict(v.split('=') for v in values.split('&'))
         fromappid, host = qualif.split('.', 1)
     except Exception: