# HG changeset patch # User Jeff Hammel # Date 1471969587 25200 # Node ID 66d11212175d61697a32e256b15d73fcc24226e6 # Parent 77c7556fa8e090ba4251d10f5dbcf1eb72de2a9f this should be ordered too diff -r 77c7556fa8e0 -r 66d11212175d martini/config.py --- a/martini/config.py Tue Aug 23 09:11:49 2016 -0700 +++ b/martini/config.py Tue Aug 23 09:26:27 2016 -0700 @@ -33,19 +33,19 @@ class ConfigMunger(ConfigParser): """combine configuration from .ini files""" - + def __init__(self, *conf, **kw): ConfigParser.__init__(self, defaults=kw.get('defaults',{}), dict_type=OrderedDict) self.optionxform = str self.read(*conf) - + def __getitem__(self, section): """ return an object with __getitem__ defined appropriately to allow referencing like self['foo']['bar'] """ - return dict(self.items(section)) + return OrderedDict(self.items(section)) def get(self, section, option, default=None, raw=False, vars=None): try: