X-Git-Url: http://rtime.felk.cvut.cz/gitweb/notmuch.git/blobdiff_plain/1fcbf095828dc91423f61a290887fe244750bf8a..fa0bc2ef91cf5c5a86ac24cd76383be3b1819cee:/bindings/python/notmuch/database.py diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py index 93e7b7a1..f3045334 100644 --- a/bindings/python/notmuch/database.py +++ b/bindings/python/notmuch/database.py @@ -483,7 +483,10 @@ class Database(object): removed. """ self._assert_db_is_initialized() - return self._remove_message(self._db, _str(filename)) + status = self._remove_message(self._db, _str(filename)) + if status not in [STATUS.SUCCESS, STATUS.DUPLICATE_MESSAGE_ID]: + raise NotmuchError(status) + return status def find_message(self, msgid): """Returns a :class:`Message` as identified by its message ID