Another Python 2.6 patch

This commit is contained in:
Miroslav Stampar
2017-04-07 15:05:54 +02:00
parent 07208c45ef
commit ad3283fd24
3 changed files with 4 additions and 5 deletions

View File

@@ -2345,8 +2345,7 @@ class ConfigDict(dict):
represent namespaces (see :meth:`load_dict`).
"""
config_obj = load(path)
obj = {key: getattr(config_obj, key) for key in dir(config_obj)
if key.isupper()}
obj = dict([(key, getattr(config_obj, key)) for key in dir(config_obj) if key.isupper()])
if squash:
self.load_dict(obj)