Mercurial > hg > pyloader
changeset 44:be4fbf390e36
a bit of restructure
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Wed, 08 Jun 2011 18:13:17 -0700 |
parents | a45743b31c6f |
children | 7b145c3d2a16 |
files | pyloader/factory.py |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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