Add check for strings. Closes #12

master
Tom Wilson 6 years ago
parent 1e5a9096ed
commit ac4d089417

@ -179,7 +179,10 @@ class ConfigManager():
if isinstance(bundle_names, dict):
for name, conf_spec in bundle_names.items():
config_values[name] = self.validate_bundle(name, conf_spec)
config_values[name] = self.get_config_bundle(name, conf_spec)
elif isinstance(bundle_names, str):
# Protection against a single name being passed anyway and otherwise
# being parsed as letters
config_values[bundle_names] = self.validate_bundle(bundle_names)
else:
for name in bundle_names:
config_values[name] = self.validate_bundle(name)
@ -219,7 +222,12 @@ class ConfigManager():
"""
config_values = {}
for name in bundle_names:
if isinstance(bundle_names, str):
# Protection against a single name being passed anyway and otherwise
# being parsed as letters
config_values[bundle_names] = self.get_config_bundle(bundle_names)
else:
for name in bundle_names:
config_values[name] = self.get_config_bundle(name)
return config_values

Loading…
Cancel
Save