* [PATCH] python: fix unchecked None access in get_property
@ 2018-09-17 12:49 Vincent Breitmoser
2018-09-20 1:01 ` David Bremner
0 siblings, 1 reply; 2+ messages in thread
From: Vincent Breitmoser @ 2018-09-17 12:49 UTC (permalink / raw)
To: notmuch
---
bindings/python/notmuch/message.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py
index d242097a..de0fb415 100644
--- a/bindings/python/notmuch/message.py
+++ b/bindings/python/notmuch/message.py
@@ -482,7 +482,7 @@ class Message(Python3StringMixIn):
if status != 0:
raise NotmuchError(status)
- return value.value.decode('utf-8')
+ return value.value.decode('utf-8') if value is not None else None
def get_properties(self, prop="", exact=False):
""" Get the properties of the message, returning a generator of
--
2.18.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-20 1:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-17 12:49 [PATCH] python: fix unchecked None access in get_property Vincent Breitmoser
2018-09-20 1:01 ` David Bremner
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).