Allow loading config directly from strings
====  Tech Notes ====
Before the refactoring of the configuration system the
ConfigurationManager allowed loading config files directly from strings.
This commit restores that functionality
@@ -203,6 +203,11 @@ class Configuration(object):
configs = [LocalConf(DEFAULT_CONFIG), RemoteConf(),
LocalConf(SYSTEM_CONFIG), LocalConf(USER_CONFIG),
Configuration.__patch]
+ else:
+ # Handle strings in stack
+ for index, item in enumerate(configs):
+ if isinstance(item, basestring):
+ configs[index] = LocalConf(item)
# Merge all configs into one
base = {}
