Don't use deprecated configparser.readfp

Running verify_tempest_config, it complains with:
  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
Andreas Jaeger 3 years ago
parent e8f1876aa6
commit 2f273243fc

@ -60,16 +60,16 @@ name (tempest.conf) is overridden.
import argparse
import configparser
import os
import re
import sys
import traceback
from urllib import parse as urlparse
from cliff import command
from oslo_log import log as logging
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.common import credentials_factory as credentials
@ -439,9 +439,9 @@ def main(opts=None):
if update:
conf_file = _get_config_file()
CONF_PARSER = moves.configparser.ConfigParser()
CONF_PARSER = configparser.ConfigParser()
CONF_PARSER.optionxform = str
# Indicate not to create network resources as part of getting credentials
net_resources = {