Versus previous hardcoded "~/.bugs_everywhere".
Also improve docstrings for
* libbe.storage.util.config.path
* libbe.ui.util.user.get_user_id
def path():
"""Return the path to the per-user config file.
+
+ Defaults to :file:`~/.bugs_everywhere`.
"""
- return os.path.expanduser("~/.bugs_everywhere")
+ return os.path.expanduser(os.path.join('~','.bugs_everywhere'))
def set_val(name, value, section="DEFAULT", encoding=None):
"""Set a value in the per-user config file.
The source order is:
- 1. Global BE configuration.
+ 1. Global BE configuration [#]_ (default section, setting 'user').
2. `storage.get_user_id`, if that function is defined.
3. :func:`get_fallback_username` and :func:`get_fallback_email`.
+ .. [#] See :mod:`libbe.storage.util.config`.
+
Notes
-----
Sometimes the storage will keep track of the user ID (e.g. most