diff options
author | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2012-01-02 17:07:53 +0100 |
---|---|---|
committer | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2012-01-02 17:07:53 +0100 |
commit | 228d8c0528311fa0e6c7ef675530b653019946de (patch) | |
tree | f643bd5e0d53befba1ca25b21cd29d95808d4b37 /bindings/python/notmuch/message.py | |
parent | ada246aa20c2f9b1e225bc50865e208d03296fc0 (diff) |
python: str.decode() doesn't like kwargs in python 2.5
Recent changes introduced lots of unicodification of strings, mostly in
the form of .decode('utf-8', errors='ignore'). However, python 2.5 does
not like the errors keyword argument and complains. It does work when
used as a simple arg though, so that's what this patch does.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Diffstat (limited to 'bindings/python/notmuch/message.py')
-rw-r--r-- | bindings/python/notmuch/message.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py index fe724a51..d40a575d 100644 --- a/bindings/python/notmuch/message.py +++ b/bindings/python/notmuch/message.py @@ -364,7 +364,7 @@ class Message(Python3StringMixIn): """ if self._msg is None: raise NotmuchError(STATUS.NOT_INITIALIZED) - return Message._get_message_id(self._msg).decode('utf-8', errors='ignore') + return Message._get_message_id(self._msg).decode('utf-8', 'ignore') def get_thread_id(self): """Returns the thread ID @@ -382,7 +382,7 @@ class Message(Python3StringMixIn): if self._msg is None: raise NotmuchError(STATUS.NOT_INITIALIZED) - return Message._get_thread_id(self._msg).decode('utf-8', errors='ignore') + return Message._get_thread_id(self._msg).decode('utf-8', 'ignore') def get_replies(self): """Gets all direct replies to this message as :class:`Messages` @@ -454,7 +454,7 @@ class Message(Python3StringMixIn): header = Message._get_header(self._msg, _str(header)) if header == None: raise NotmuchError(STATUS.NULL_POINTER) - return header.decode('UTF-8', errors='ignore') + return header.decode('UTF-8', 'ignore') def get_filename(self): """Returns the file path of the message file @@ -465,7 +465,7 @@ class Message(Python3StringMixIn): """ if self._msg is None: raise NotmuchError(STATUS.NOT_INITIALIZED) - return Message._get_filename(self._msg).decode('utf-8', errors='ignore') + return Message._get_filename(self._msg).decode('utf-8', 'ignore') def get_filenames(self): """Get all filenames for the email corresponding to 'message' |