aboutsummaryrefslogtreecommitdiffhomepage
path: root/bindings/python/notmuch/message.py
diff options
context:
space:
mode:
authorGravatar Justus Winter <4winter@informatik.uni-hamburg.de>2011-09-25 23:07:35 +0200
committerGravatar Sebastian Spaeth <Sebastian@SSpaeth.de>2011-09-29 09:48:06 +0200
commit19daa117b90289d724392e04e3647ade6db4dd7b (patch)
treed5d8bd59a3571e211cad9f976f59245dc26bf6e8 /bindings/python/notmuch/message.py
parent34990908e75f73061753a7f38201a05247a207a1 (diff)
properly raise exceptions in python bindings
There are various locations where exceptions are constructed but not raised. This patch adds the necessary raise statements. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Diffstat (limited to 'bindings/python/notmuch/message.py')
-rw-r--r--bindings/python/notmuch/message.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py
index e5f60621..0c3365b5 100644
--- a/bindings/python/notmuch/message.py
+++ b/bindings/python/notmuch/message.py
@@ -115,7 +115,7 @@ class Messages(object):
the Python object.(?)
"""
if msgs_p is None:
- NotmuchError(STATUS.NULL_POINTER)
+ raise NotmuchError(STATUS.NULL_POINTER)
self._msgs = msgs_p
#store parent, so we keep them alive as long as self is alive
@@ -290,7 +290,7 @@ class Message(object):
objects are dead.
"""
if msg_p is None:
- NotmuchError(STATUS.NULL_POINTER)
+ raise NotmuchError(STATUS.NULL_POINTER)
self._msg = msg_p
#keep reference to parent, so we keep it alive
self._parent = parent