changeset 67:236af713bbc0

move setting the configuration to later so that we can easily move around sect
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 09 Jun 2011 09:25:54 -0700
parents 2a9274608af3
children 65609d7ba63d
files pyloader/factory.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pyloader/factory.py	Thu Jun 09 09:24:45 2011 -0700
+++ b/pyloader/factory.py	Thu Jun 09 09:25:54 2011 -0700
@@ -184,7 +184,7 @@
 
             # make a dict for the section
             path = path % defaults
-            sect = config[name] = dict(path=path)
+            sect = dict(path=path)
 
             # get arguments from .ini options
             for option, value in options.items():
@@ -193,6 +193,9 @@
                 else: # keyword arguments
                     sect.setdefault('kwargs', {})[option] = value
 
+            # set the configuration
+            config[name] = sect
+
         # get the object definitions
         for section, options in iniconfig.items():
             seen.add(section)