aboutsummaryrefslogtreecommitdiffhomepage
path: root/bindings/python/notmuch/message.py
diff options
context:
space:
mode:
authorGravatar Justus Winter <4winter@informatik.uni-hamburg.de>2011-12-14 11:58:25 +0100
committerGravatar Sebastian Spaeth <Sebastian@SSpaeth.de>2012-01-02 16:34:56 +0100
commit83b256b12be25b29f915587342b5ccb139864268 (patch)
treed0426a15d3a3834a5b5d9381c8ae9ea361badcdc /bindings/python/notmuch/message.py
parent4a6642a2a1e2d15f71fff6b6a0b4bbb0296e2bdb (diff)
python: add missing conversions from and to utf-8
Diffstat (limited to 'bindings/python/notmuch/message.py')
-rw-r--r--bindings/python/notmuch/message.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py
index 955382da..245e8148 100644
--- a/bindings/python/notmuch/message.py
+++ b/bindings/python/notmuch/message.py
@@ -338,7 +338,7 @@ class Message(Python3StringMixIn):
"""
if self._msg is None:
raise NotmuchError(STATUS.NOT_INITIALIZED)
- return Message._get_message_id(self._msg)
+ return Message._get_message_id(self._msg).decode('utf-8', errors='ignore')
def get_thread_id(self):
"""Returns the thread ID
@@ -356,7 +356,7 @@ class Message(Python3StringMixIn):
if self._msg is None:
raise NotmuchError(STATUS.NOT_INITIALIZED)
- return Message._get_thread_id(self._msg)
+ return Message._get_thread_id(self._msg).decode('utf-8', errors='ignore')
def get_replies(self):
"""Gets all direct replies to this message as :class:`Messages`
@@ -426,7 +426,7 @@ class Message(Python3StringMixIn):
raise NotmuchError(STATUS.NOT_INITIALIZED)
#Returns NULL if any error occurs.
- header = Message._get_header(self._msg, header)
+ header = Message._get_header(self._msg, _str(header))
if header == None:
raise NotmuchError(STATUS.NULL_POINTER)
return header.decode('UTF-8', errors='ignore')
@@ -440,7 +440,7 @@ class Message(Python3StringMixIn):
"""
if self._msg is None:
raise NotmuchError(STATUS.NOT_INITIALIZED)
- return Message._get_filename(self._msg)
+ return Message._get_filename(self._msg).decode('utf-8', errors='ignore')
def get_filenames(self):
"""Get all filenames for the email corresponding to 'message'