]> git.cworth.org Git - notmuch/blobdiff - bindings/python/notmuch/database.py
python: Improve the docstring of Database.get_directory
[notmuch] / bindings / python / notmuch / database.py
index 504bb8804223fe94a502f9078eeee5dcaff01dae..bef9720fcc7105599c4c7be21059659bb9c7f5a2 100644 (file)
@@ -122,7 +122,8 @@ class Database(object):
     _create.argtypes = [c_char_p]
     _create.restype = NotmuchDatabaseP
 
-    def __init__(self, path=None, create=False, mode=0):
+    def __init__(self, path = None, create = False,
+                 mode = MODE.READ_ONLY):
         """If *path* is `None`, we will try to read a users notmuch
         configuration and use his configured database. The location of the
         configuration file can be specified through the environment variable
@@ -344,10 +345,8 @@ class Database(object):
               of database (see :meth:`get_path`), or else should be an absolute
               path with initial components that match the path of 'database'.
         :returns: :class:`Directory` or raises an exception.
-        :raises:
-            :exc:`NotmuchError` with :attr:`STATUS`.FILE_ERROR
-                    If path is not relative database or absolute with initial
-                    components same as database.
+        :raises: :exc:`FileError` if path is not relative database or absolute
+                 with initial components same as database.
         """
         self._assert_db_is_initialized()
         # sanity checking if path is valid, and make path absolute