Merge "Update ConfigParser imports for python3"
This commit is contained in:
commit
7e539bd34f
@ -39,7 +39,7 @@
|
||||
# oauth_token = GITHUB_OAUTH_TOKEN
|
||||
|
||||
import argparse
|
||||
import ConfigParser
|
||||
from six.moves import configparser
|
||||
import github
|
||||
import logging
|
||||
import os
|
||||
@ -87,7 +87,7 @@ def main():
|
||||
GITHUB_SECURE_CONFIG = os.environ.get('GITHUB_SECURE_CONFIG',
|
||||
'/etc/github/github.secure.config')
|
||||
|
||||
secure_config = ConfigParser.ConfigParser()
|
||||
secure_config = configparser.ConfigParser()
|
||||
secure_config.read(GITHUB_SECURE_CONFIG)
|
||||
registry = u.ProjectsRegistry()
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
||||
# project: OTHER_PROJECT_NAME
|
||||
|
||||
import argparse
|
||||
import ConfigParser
|
||||
from six.moves import configparser
|
||||
import glob
|
||||
import hashlib
|
||||
import json
|
||||
@ -273,7 +273,7 @@ def create_update_github_project(
|
||||
if not needs_update:
|
||||
return False
|
||||
|
||||
secure_config = ConfigParser.ConfigParser()
|
||||
secure_config = configparser.ConfigParser()
|
||||
secure_config.read(github_secure_config)
|
||||
|
||||
global orgs
|
||||
|
@ -23,7 +23,7 @@ from __future__ import print_function
|
||||
|
||||
__author__ = "Chmouel Boudjnah <chmouel@chmouel.com>"
|
||||
|
||||
import ConfigParser
|
||||
from six.moves import configparser
|
||||
import cStringIO
|
||||
import datetime
|
||||
import json
|
||||
@ -63,7 +63,7 @@ def parse_ini(inifile):
|
||||
ret = {}
|
||||
if not os.path.exists(inifile):
|
||||
return
|
||||
config = ConfigParser.RawConfigParser(allow_no_value=True)
|
||||
config = configparser.RawConfigParser(allow_no_value=True)
|
||||
config.read(inifile)
|
||||
|
||||
if config.has_section('swift'):
|
||||
|
@ -18,7 +18,7 @@
|
||||
# corresponding Launchpad blueprints with links back to the change.
|
||||
|
||||
import argparse
|
||||
import ConfigParser
|
||||
from six.moves import configparser
|
||||
import os
|
||||
import re
|
||||
import StringIO
|
||||
@ -55,7 +55,7 @@ def get_broken_config(filename):
|
||||
text = "%s%s" % (text, line.lstrip())
|
||||
|
||||
fp = StringIO.StringIO(text)
|
||||
c = ConfigParser.ConfigParser()
|
||||
c = configparser.ConfigParser()
|
||||
c.readfp(fp)
|
||||
return c
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import ConfigParser
|
||||
from six.moves import configparser
|
||||
import os
|
||||
import StringIO
|
||||
|
||||
@ -35,7 +35,7 @@ def get_broken_config(filename):
|
||||
text += line.lstrip()
|
||||
|
||||
fp = StringIO.StringIO(text)
|
||||
c = ConfigParser.ConfigParser()
|
||||
c = configparser.ConfigParser()
|
||||
c.readfp(fp)
|
||||
return c
|
||||
|
||||
|
@ -26,7 +26,7 @@ Expected review.projects.yaml format:
|
||||
- no-launchpad-blueprints
|
||||
"""
|
||||
|
||||
import ConfigParser
|
||||
from six.moves import configparser
|
||||
|
||||
import jeepyb.utils as u
|
||||
|
||||
@ -69,7 +69,7 @@ def has_github(project_full_name):
|
||||
# ...and if it's not set, then still don't use it.
|
||||
return False
|
||||
# It's okay if the global option or even the section for this don't exist.
|
||||
except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
|
||||
except (configparser.NoSectionError, configparser.NoOptionError):
|
||||
pass
|
||||
# If we got this far, we either explicitly or implicitly default to use it.
|
||||
return True
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import ConfigParser
|
||||
from six.moves import configparser
|
||||
import logging
|
||||
import os
|
||||
import shlex
|
||||
@ -196,7 +196,7 @@ class ProjectsRegistry(object):
|
||||
self._configs_list = self.yaml_doc[1]
|
||||
|
||||
if os.path.exists(PROJECTS_INI):
|
||||
self.defaults = ConfigParser.ConfigParser()
|
||||
self.defaults = configparser.ConfigParser()
|
||||
self.defaults.read(PROJECTS_INI)
|
||||
else:
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user