# HG changeset patch
# User Jeff Hammel <jhammel@mozilla.com>
# Date 1307581997 25200
# Node ID be4fbf390e36953457880646035b9e54ad9bb81c
# Parent  a45743b31c6fb9197d1f94a68d9003bf55da7283
a bit of restructure

diff -r a45743b31c6f -r be4fbf390e36 pyloader/factory.py
--- a/pyloader/factory.py	Wed Jun 08 18:07:12 2011 -0700
+++ b/pyloader/factory.py	Wed Jun 08 18:13:17 2011 -0700
@@ -106,12 +106,17 @@
         interpolated = set()
         seen = set()
 
-        def create_section(section, options):
+        # create a hash of section names
+        names = {}
+        for section in iniconfig:
 
             # sanity check
             assert ':' in section, "No : in section: %s" % section
+            
 
-            # make a dict for the section
+        def create_section(section, options):
+
+            # split up the section identifier
             name, path = section.split(':', 1)
 
             # interpret decorators
@@ -121,10 +126,12 @@
                 if wrapper in iniconfig:
                     
                     path = _path
-            
+
+            # make a dict for the section
             path = path % defaults
             sect = config[name] = dict(path=path)
 
+            # get arguments from .ini options
             for option, value in options.items():
                 
                 if option == '.': # positional arguments