# HG changeset patch # User Jeff Hammel # Date 1472001431 25200 # Node ID c77259f467a30832e6caeab15624e163ce010c6c # Parent 66d11212175d61697a32e256b15d73fcc24226e6 hopefully OrderedDict preservation actually works now diff -r 66d11212175d -r c77259f467a3 martini/config.py --- a/martini/config.py Tue Aug 23 09:26:27 2016 -0700 +++ b/martini/config.py Tue Aug 23 18:17:11 2016 -0700 @@ -26,7 +26,8 @@ if os.path.exists(resource): return file(resource) - if sum([resource.startswith(http) for http in 'http://', 'https://']): + if sum([resource.startswith(http) + for http in 'http://', 'https://']): return urllib2.urlopen(resource) return StringIO(resource) @@ -64,13 +65,15 @@ _section = self[section] self.remove_section(section) else: - _section = {} - self.read({newname: _section}) + _section = OrderedDict() + self.read(OrderedDict(newname=_section)) def dict(self): - """return a dictionary of dictionaries; + """ + return a dictionary of dictionaries: the outer with keys of section names; - the inner with keys, values of the section""" + the inner with keys, values of the section + """ return OrderedDict([(section, self[section]) for section in self.sections()]) diff -r 66d11212175d -r c77259f467a3 setup.py --- a/setup.py Tue Aug 23 09:26:27 2016 -0700 +++ b/setup.py Tue Aug 23 18:17:11 2016 -0700 @@ -6,7 +6,7 @@ except: description = '' -version = '0.4.1' +version = '0.4.2' setup(name='martINI', version=version, @@ -23,7 +23,7 @@ zip_safe=False, install_requires=[ # -*- Extra requirements: -*- - 'WebOb', + 'WebOb', 'Paste', 'PasteScript', 'genshi'