]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/python/notmuch/database.py
python: allow an empty path as parameter to Database.get_directory
[notmuch] / bindings / python / notmuch / database.py
index 9f6b3800553abbf8b183ebf8c1b0398ee71f410c..ab3cdec53738ee5e1398e5efea766ebba85e6629 100644 (file)
@@ -176,7 +176,6 @@ class Database(object):
 
         :param path: A directory in which we should create the database.
         :type path: str
-        :returns: Nothing
         :raises: :exc:`NotmuchError` in case of any failure
                     (possibly after printing an error message on stderr).
         """
@@ -200,7 +199,6 @@ class Database(object):
 
         :param status: Open the database in read-only or read-write mode
         :type status:  :attr:`MODE`
-        :returns: Nothing
         :raises: Raises :exc:`NotmuchError` in case of any failure
                     (possibly after printing an error message on stderr).
         """
@@ -353,7 +351,7 @@ class Database(object):
         """
         self._assert_db_is_initialized()
         # sanity checking if path is valid, and make path absolute
-        if path[0] == os.sep:
+        if path and path[0] == os.sep:
             # we got an absolute path
             if not path.startswith(self.get_path()):
                 # but its initial components are not equal to the db path
@@ -699,7 +697,6 @@ class Directory(object):
         Retrieves a previously stored mtime for this directory.
 
         :param mtime: A (time_t) timestamp
-        :returns: Nothing on success, raising an exception on failure.
         :raises: :exc:`NotmuchError`:
 
                         :attr:`STATUS`.NOT_INITIALIZED