Commit 5e5a0d9f authored by Titouan Soulard's avatar Titouan Soulard Committed by Thomas Gambier

cli: drop legacy `SafeConfigParser`

The old `SafeConfigParser` class has been deprecated since Python 3.2, and was
fully dropped in Python 3.11. See issue
[#45173](https://bugs.python.org/issue45173) on Python's bugtracker.

/cc @xavier_thompson who may ping anyone else if needed
parent c954ee83
......@@ -77,7 +77,7 @@ class ConfigCommand(Command):
if not os.path.exists(cfg_path):
raise ConfigError('Configuration file does not exist: %s' % cfg_path)
configp = configparser.SafeConfigParser()
configp = configparser.ConfigParser()
if configp.read(cfg_path) != [cfg_path]:
# bad permission, etc.
raise ConfigError('Cannot parse configuration file: %s' % cfg_path)
......
......@@ -119,7 +119,7 @@ database_uri = %(rootdir)s/lib/proxy.db
Set config for slapproxy and start it
"""
conf = slapos.proxy.ProxyConfig(logger=logging.getLogger())
configp = configparser.SafeConfigParser()
configp = configparser.ConfigParser()
configp.read(self.slapos_cfg)
conf.mergeConfig(ProxyOption(self.proxy_db), configp)
conf.setConfig()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment