Mercurial > libervia-pubsub
diff twisted/plugins/pubsub.py @ 445:fe24bb60236f
core: update conf file name following project renaming:
As "Salut à Toi" has been renamed to "Libervia", the conf file is now named
`libervia.conf`. To keep backward compatibility, `sat.conf` is still checked for the
moment.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 21 Mar 2021 14:38:00 +0100 |
parents | 074037832daf |
children | cc29a62fb64c |
line wrap: on
line diff
--- a/twisted/plugins/pubsub.py Sun Mar 21 14:36:40 2021 +0100 +++ b/twisted/plugins/pubsub.py Sun Mar 21 14:38:00 2021 +0100 @@ -117,14 +117,24 @@ env_name = f"{ENV_PREFIX}{name.upper()}" ENV_OPT_MAP.setdefault(name, []).append(env_name) -CONFIG_FILENAME = 'sat' +CONFIG_FILENAME = 'libervia' # List of the configuration filenames sorted by ascending priority -CONFIG_FILES = [realpath(expanduser(path) + CONFIG_FILENAME + '.conf') for path in ( +CONFIG_FILES = ( + [realpath(expanduser(path) + CONFIG_FILENAME + '.conf') for path in ( '/etc/', '/etc/{}/'.format(CONFIG_FILENAME), '~/', '~/.', '.config/', '.config/.', '.config/{}/'.format(CONFIG_FILENAME), '', '.')] + + + # "sat.conf" is the legacy name of the config file + [realpath(expanduser(path) + "sat.conf") for path in ( + '/etc/', '/etc/{}/'.format("sat"), + '~/', '~/.', + '.config/', '.config/.', + '.config/{}/'.format("sat"), + '', '.')] +) CONFIG_SECTION = 'pubsub'