aboutsummaryrefslogtreecommitdiff
path: root/bindings/python/notmuch/thread.py
diff options
context:
space:
mode:
authorSebastian Spaeth <Sebastian@SSpaeth.de>2012-01-02 17:07:53 +0100
committerSebastian Spaeth <Sebastian@SSpaeth.de>2012-01-02 17:07:53 +0100
commit228d8c0528311fa0e6c7ef675530b653019946de (patch)
treef643bd5e0d53befba1ca25b21cd29d95808d4b37 /bindings/python/notmuch/thread.py
parentada246aa20c2f9b1e225bc50865e208d03296fc0 (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/thread.py')
-rw-r--r--bindings/python/notmuch/thread.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bindings/python/notmuch/thread.py b/bindings/python/notmuch/thread.py
index 03e472d..e81ff1b 100644
--- a/bindings/python/notmuch/thread.py
+++ b/bindings/python/notmuch/thread.py
@@ -246,7 +246,7 @@ class Thread(object):
"""
if self._thread is None:
raise NotmuchError(STATUS.NOT_INITIALIZED)
- return Thread._get_thread_id(self._thread).decode('utf-8', errors='ignore')
+ return Thread._get_thread_id(self._thread).decode('utf-8', 'ignore')
_get_total_messages = nmlib.notmuch_thread_get_total_messages
_get_total_messages.argtypes = [NotmuchThreadP]
@@ -326,7 +326,7 @@ class Thread(object):
authors = Thread._get_authors(self._thread)
if authors is None:
return None
- return authors.decode('UTF-8', errors='ignore')
+ return authors.decode('UTF-8', 'ignore')
def get_subject(self):
"""Returns the Subject of 'thread'
@@ -339,7 +339,7 @@ class Thread(object):
subject = Thread._get_subject(self._thread)
if subject is None:
return None
- return subject.decode('UTF-8', errors='ignore')
+ return subject.decode('UTF-8', 'ignore')
def get_newest_date(self):
"""Returns time_t of the newest message date