]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/python/notmuch/database.py
python: Remove find_message_by_filename workaround
[notmuch] / bindings / python / notmuch / database.py
index ff89818b53c4631f4076f2f1e3e29c8f4559957a..e5c74cfb164557e53914559f758712b491a3d78d 100644 (file)
@@ -526,19 +526,10 @@ class Database(object):
                  retry.
         :raises: :exc:`NotInitializedError` if the database was not
                  intitialized.
-        :raises: :exc:`ReadOnlyDatabaseError` if the database has not been
-                 opened in read-write mode
 
         *Added in notmuch 0.9*"""
         self._assert_db_is_initialized()
 
-        # work around libnotmuch calling exit(3), see
-        # id:20120221002921.8534.57091@thinkbox.jade-hamburg.de
-        # TODO: remove once this issue is resolved
-        if self.mode != Database.MODE.READ_WRITE:
-            raise ReadOnlyDatabaseError('The database has to be opened in '
-                                        'read-write mode for get_directory')
-
         msg_p = NotmuchMessageP()
         status = Database._find_message_by_filename(self._db, _str(filename),
                                                     byref(msg_p))