commit 02f1c3b2120033af5b45b109d35ba73775219abf (patch)
parent f7b62d35 Changelog stanza for 0.11 backport
tree 804b54bd091a407cf9aceb145d9fa40893d53e37
author Sebastian Spaeth <Sebastian@SSpaeth.de> 2012-01-02 17:07:53 +0100
committer David Bremner <bremner@debian.org> 2012-01-27 20:09:07 -0400
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>
Backported to 0.11 by David Bremner <david@tethera.net>
Conflicts:
bindings/python/notmuch/database.py
bindings/python/notmuch/filename.py
bindings/python/notmuch/message.py
bindings/python/notmuch/thread.py
---
bindings/python/notmuch/message.py | 2 +-
bindings/python/notmuch/thread.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py
index ce8e7181..49a58d1f 100644
--- a/bindings/python/notmuch/message.py
+++ b/bindings/python/notmuch/message.py
@@ -427,7 +427,7 @@ class Message(object):
header = Message._get_header(self._msg, 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
diff --git a/bindings/python/notmuch/thread.py b/bindings/python/notmuch/thread.py
index 5058846d..ea25e6e4 100644
--- a/bindings/python/notmuch/thread.py
+++ b/bindings/python/notmuch/thread.py
@@ -325,7 +325,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'
@@ -338,7 +338,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
glossary
--------
Commit objects reference one tree, and zero or more parents.
Single parent commits can typically generate a patch in
unified diff format via `git format-patch'.
Multiple parents means the commit is a merge.
Root commits have no ancestor. Note that it is
possible to have multiple root commits when merging independent histories.
Every commit references one top-level tree object.
git clone https://yhetil.org/notmuch.git