unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] python/thread: always return a string in get_subject/authors
@ 2011-05-09  7:06 Anton Khirnov
  2011-05-09 12:10 ` Austin Clements
  2011-05-09 12:20 ` David Bremner
  0 siblings, 2 replies; 9+ messages in thread
From: Anton Khirnov @ 2011-05-09  7:06 UTC (permalink / raw)
  To: notmuch

Now None is returned when those don't exist, which is inconvenient to
deal with.
---
 bindings/python/notmuch/thread.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/bindings/python/notmuch/thread.py b/bindings/python/notmuch/thread.py
index eebd6cb..cf26957 100644
--- a/bindings/python/notmuch/thread.py
+++ b/bindings/python/notmuch/thread.py
@@ -281,7 +281,8 @@ class Thread(object):
         """
         if self._thread is None:
             raise NotmuchError(STATUS.NOT_INITIALIZED)
-        return Thread._get_authors(self._thread)
+        ret = Thread._get_authors(self._thread)
+        return ret if ret else ''
 
     def get_subject(self):
         """Returns the Subject of 'thread'
@@ -291,7 +292,8 @@ class Thread(object):
         """
         if self._thread is None:
             raise NotmuchError(STATUS.NOT_INITIALIZED)
-        return Thread._get_subject(self._thread)
+        ret = Thread._get_subject(self._thread)
+        return ret if ret else ''
 
     def get_newest_date(self):
         """Returns time_t of the newest message date
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-05-10  1:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-09  7:06 [PATCH] python/thread: always return a string in get_subject/authors Anton Khirnov
2011-05-09 12:10 ` Austin Clements
2011-05-09 12:20 ` David Bremner
2011-05-09 12:57   ` servilio
2011-05-09 15:13   ` Anton Khirnov
2011-05-09 15:23     ` Jesse Rosenthal
2011-05-09 15:26       ` Jesse Rosenthal
2011-05-10  1:00   ` Sebastian Spaeth
2011-05-10  1:18     ` Daniel Kahn Gillmor

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).