Skip to content

Commit

Permalink
Merge "Access configuration sections from config file only if those s…
Browse files Browse the repository at this point in the history
…ections are present"
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Aug 26, 2015
2 parents 9bf1b58 + 640934c commit 65ae5c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/discovery/disc_server.py
Expand Up @@ -1065,7 +1065,6 @@ def parse_args(args_str):
if args.conf_file:
config = ConfigParser.SafeConfigParser()
config.read(args.conf_file)
defaults.update(dict(config.items("DEFAULTS")))
defaults.update(cassandra_opts)
for section in config.sections():
if section == "CASSANDRA":
Expand All @@ -1074,6 +1073,7 @@ def parse_args(args_str):
dict(config.items(section)))
continue
if section == "DEFAULTS":
defaults.update(dict(config.items("DEFAULTS")))
continue
service_config[
section.lower()] = default_service_opts.copy()
Expand Down

0 comments on commit 65ae5c9

Please sign in to comment.