diff --git a/keystone/templates/bin/_cred-clean.py.tpl b/keystone/templates/bin/_cred-clean.py.tpl index 9d1306a07e..4d2c3f1439 100644 --- a/keystone/templates/bin/_cred-clean.py.tpl +++ b/keystone/templates/bin/_cred-clean.py.tpl @@ -25,8 +25,10 @@ import os import sys try: import ConfigParser + PARSER_OPTS = {} except ImportError: import configparser as ConfigParser + PARSER_OPTS = {"strict": False} import logging from sqlalchemy import create_engine @@ -64,7 +66,7 @@ if "OPENSTACK_CONFIG_FILE" in os.environ: logger.critical('environment variable OPENSTACK_CONFIG_DB_KEY not set') sys.exit(1) try: - config = ConfigParser.RawConfigParser() + config = ConfigParser.RawConfigParser(**PARSER_OPTS) logger.info("Using {0} as db config source".format(os_conf)) config.read(os_conf) logger.info("Trying to load db config from {0}:{1}".format( diff --git a/keystone/templates/bin/_endpoint-update.py.tpl b/keystone/templates/bin/_endpoint-update.py.tpl index 62794f836d..7ea1a5b6d4 100644 --- a/keystone/templates/bin/_endpoint-update.py.tpl +++ b/keystone/templates/bin/_endpoint-update.py.tpl @@ -19,8 +19,10 @@ import os import sys try: import ConfigParser + PARSER_OPTS = {} except ImportError: import configparser as ConfigParser + PARSER_OPTS = {"strict": False} import logging from sqlalchemy import create_engine @@ -49,7 +51,7 @@ if "OPENSTACK_CONFIG_FILE" in os.environ: logger.critical('environment variable OPENSTACK_CONFIG_DB_KEY not set') sys.exit(1) try: - config = ConfigParser.RawConfigParser() + config = ConfigParser.RawConfigParser(**PARSER_OPTS) logger.info("Using {0} as db config source".format(os_conf)) config.read(os_conf) logger.info("Trying to load db config from {0}:{1}".format(