: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
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"
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