comparison twisted/plugins/libervia_server.py @ 1400:4117f1b63765

core (twisted/plugin): use `config.parseMainConf` instad of configparser
author Goffi <goffi@goffi.org>
date Sat, 20 Mar 2021 18:23:18 +0100
parents ed037818d6de
children 388558a30cf8
comparison
equal deleted inserted replaced
1399:28aded9b8460 1400:4117f1b63765
179 # there's no good way to know 179 # there's no good way to know
180 # if the options values are the hard-coded ones or if they have been passed 180 # if the options values are the hard-coded ones or if they have been passed
181 # on the command line. 181 # on the command line.
182 182
183 # FIXME: must be refactored + code can be factorised with backend 183 # FIXME: must be refactored + code can be factorised with backend
184 config_parser = configparser.ConfigParser() 184 config_parser = config.parseMainConf(True)
185 config_parser.read(C.CONFIG_FILES)
186 self.handleDeprecated(config_parser) 185 self.handleDeprecated(config_parser)
187 for param in self.optParameters + OPT_PARAMETERS_CFG: 186 for param in self.optParameters + OPT_PARAMETERS_CFG:
188 name = param[0] 187 name = param[0]
189 env_name = f"{ENV_PREFIX}{name.upper()}" 188 env_name = f"{ENV_PREFIX}{name.upper()}"
190 try: 189 try: