X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=bindings%2Fpython%2Fnotmuch%2Fdatabase.py;h=67fb1c41142428ed6c06e36a985de8f1f784a1db;hb=6a833a6e83865f6999707cc30768d07e1351c2cb;hp=93e7b7a1cb64d8ffa7aa8607bb679546d995ed2d;hpb=a5c1536d9a631f15c74602ef12a0867d278a7af0;p=notmuch diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py index 93e7b7a1..67fb1c41 100644 --- a/bindings/python/notmuch/database.py +++ b/bindings/python/notmuch/database.py @@ -12,7 +12,7 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with notmuch. If not, see . +along with notmuch. If not, see . Copyright 2010 Sebastian Spaeth """ @@ -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