diff martini/config.py @ 8:81aed4352851

make martini work with an ordered dictionary
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 24 Nov 2010 11:05:40 -0800
parents 7c8f23eae311
children 77c7556fa8e0
line wrap: on
line diff
--- a/martini/config.py	Wed Nov 24 10:55:59 2010 -0800
+++ b/martini/config.py	Wed Nov 24 11:05:40 2010 -0800
@@ -4,6 +4,7 @@
 import sys
 import urllib2
 
+from odict import OrderedDict
 from ConfigParser import ConfigParser
 from ConfigParser import InterpolationMissingOptionError
 from ConfigParser import MissingSectionHeaderError
@@ -29,7 +30,8 @@
     """combine configuration from .ini files"""
     
     def __init__(self, *conf, **kw):
-        ConfigParser.__init__(self, kw.get('defaults',{}))
+        ConfigParser.__init__(self, defaults=kw.get('defaults',{}),
+                              dict_type=OrderedDict)
         self.optionxform = str
         self.read(*conf)