]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/python/notmuch/message.py
properly raise exceptions in python bindings
[notmuch] / bindings / python / notmuch / message.py
index e5f606217f560b179b6db0fb7a25df5dbcdf0865..0c3365b50414068bf7527a533eb8f3a447169780 100644 (file)
@@ -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