Use ConfigParser instead of SafeConfigParser
SafeConfigParser supports interpolation on top of ConfigParser in Python 2, and SafeConfigParser is deprecated in Python 3.2 and log warning like " DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in future versions. Use ConfigParser directly instead." So we can use ConfigParser if we don't need interpolation. Change-Id: If210bd1322df96c0c8aea1f257148dc46affb422 Closes-Bug: #1618666
This commit is contained in:
parent
41383e6e22
commit
8254a3f54d
|
@ -93,7 +93,7 @@ class TempestInit(command.Command):
|
|||
testr_conf_file.write(testr_conf)
|
||||
|
||||
def get_configparser(self, conf_path):
|
||||
config_parse = moves.configparser.SafeConfigParser()
|
||||
config_parse = moves.configparser.ConfigParser()
|
||||
config_parse.optionxform = str
|
||||
# get any existing values if a config file already exists
|
||||
if os.path.isfile(conf_path):
|
||||
|
|
|
@ -373,7 +373,7 @@ def main(opts=None):
|
|||
outfile = sys.stdout
|
||||
if update:
|
||||
conf_file = _get_config_file()
|
||||
CONF_PARSER = moves.configparser.SafeConfigParser()
|
||||
CONF_PARSER = moves.configparser.ConfigParser()
|
||||
CONF_PARSER.optionxform = str
|
||||
CONF_PARSER.readfp(conf_file)
|
||||
|
||||
|
|
Loading…
Reference in New Issue