comparison 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
comparison
equal deleted inserted replaced
444:853432aa8002 445:fe24bb60236f
115 for opt in OPT_PARAMETERS_BOTH + OPT_PARAMETERS_CFG: 115 for opt in OPT_PARAMETERS_BOTH + OPT_PARAMETERS_CFG:
116 name = opt[0] 116 name = opt[0]
117 env_name = f"{ENV_PREFIX}{name.upper()}" 117 env_name = f"{ENV_PREFIX}{name.upper()}"
118 ENV_OPT_MAP.setdefault(name, []).append(env_name) 118 ENV_OPT_MAP.setdefault(name, []).append(env_name)
119 119
120 CONFIG_FILENAME = 'sat' 120 CONFIG_FILENAME = 'libervia'
121 # List of the configuration filenames sorted by ascending priority 121 # List of the configuration filenames sorted by ascending priority
122 CONFIG_FILES = [realpath(expanduser(path) + CONFIG_FILENAME + '.conf') for path in ( 122 CONFIG_FILES = (
123 [realpath(expanduser(path) + CONFIG_FILENAME + '.conf') for path in (
123 '/etc/', '/etc/{}/'.format(CONFIG_FILENAME), 124 '/etc/', '/etc/{}/'.format(CONFIG_FILENAME),
124 '~/', '~/.', 125 '~/', '~/.',
125 '.config/', '.config/.', 126 '.config/', '.config/.',
126 '.config/{}/'.format(CONFIG_FILENAME), 127 '.config/{}/'.format(CONFIG_FILENAME),
127 '', '.')] 128 '', '.')]
129 +
130 # "sat.conf" is the legacy name of the config file
131 [realpath(expanduser(path) + "sat.conf") for path in (
132 '/etc/', '/etc/{}/'.format("sat"),
133 '~/', '~/.',
134 '.config/', '.config/.',
135 '.config/{}/'.format("sat"),
136 '', '.')]
137 )
128 CONFIG_SECTION = 'pubsub' 138 CONFIG_SECTION = 'pubsub'
129 139
130 140
131 class Options(usage.Options): 141 class Options(usage.Options):
132 optParameters = OPT_PARAMETERS_BOTH 142 optParameters = OPT_PARAMETERS_BOTH