Don't use deprecated configparser.readfp
Running verify_tempest_config, it complains with: /opt/stack/tempest/tempest/cmd/verify_tempest_config.py:444: DeprecationWarning: This method will be removed in future versions. Use 'parser.read_file()' instead. Use read_file. Also, remove one extra use of six in this file. Change-Id: Ia32df8e2be29bb0951efd08db9eed9e67d749e1f
This commit is contained in:
parent
e8f1876aa6
commit
2f273243fc
|
@ -60,16 +60,16 @@ name (tempest.conf) is overridden.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import configparser
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
from urllib import parse as urlparse
|
||||||
|
|
||||||
from cliff import command
|
from cliff import command
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_serialization import jsonutils as json
|
from oslo_serialization import jsonutils as json
|
||||||
from six import moves
|
|
||||||
from six.moves.urllib import parse as urlparse
|
|
||||||
|
|
||||||
from tempest import clients
|
from tempest import clients
|
||||||
from tempest.common import credentials_factory as credentials
|
from tempest.common import credentials_factory as credentials
|
||||||
|
@ -439,9 +439,9 @@ def main(opts=None):
|
||||||
|
|
||||||
if update:
|
if update:
|
||||||
conf_file = _get_config_file()
|
conf_file = _get_config_file()
|
||||||
CONF_PARSER = moves.configparser.ConfigParser()
|
CONF_PARSER = configparser.ConfigParser()
|
||||||
CONF_PARSER.optionxform = str
|
CONF_PARSER.optionxform = str
|
||||||
CONF_PARSER.readfp(conf_file)
|
CONF_PARSER.read_file(conf_file)
|
||||||
|
|
||||||
# Indicate not to create network resources as part of getting credentials
|
# Indicate not to create network resources as part of getting credentials
|
||||||
net_resources = {
|
net_resources = {
|
||||||
|
|
Loading…
Reference in New Issue