X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=bindings%2Fpython%2Fnotmuch%2Fdatabase.py;h=88ca836e2d1aa4c78471ede28f7541fac630aafa;hp=a1ae14fc40ccbc11608034b874ca7a3cd94436f0;hb=7eb9615b30274033cc0c828244569c709906c40b;hpb=6aec7a76b9e70544a93b092c50d167c3e63548ee diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py index a1ae14fc..88ca836e 100644 --- a/bindings/python/notmuch/database.py +++ b/bindings/python/notmuch/database.py @@ -566,7 +566,7 @@ class Database(object): :returns: :class:`Message` or `None` if no message is found. :raises: :exc:`OutOfMemoryError` - If an Out-of-memory occured while constructing the message. + If an Out-of-memory occurred while constructing the message. :exc:`XapianError` In case of a Xapian Exception. These exceptions include "Database modified" situations, e.g. when the @@ -591,7 +591,7 @@ class Database(object): function returns None if no message is found with the given filename. - :raises: :exc:`OutOfMemoryError` if an Out-of-memory occured while + :raises: :exc:`OutOfMemoryError` if an Out-of-memory occurred while constructing the message. :raises: :exc:`XapianError` in case of a Xapian Exception. These exceptions include "Database modified" @@ -675,7 +675,10 @@ class Database(object): if not config.has_option('database', 'path'): raise NotmuchError(message="No DB path specified" " and no user default found") - return config.get('database', 'path') + db_path = config.get('database', 'path') + if not os.path.isabs(db_path): + db_path = os.path.expanduser(os.path.join("~", db_path)) + return db_path """notmuch_database_get_config""" _get_config = nmlib.notmuch_database_get_config