Mercurial > hg > pyloader
changeset 68:65609d7ba63d
move around when we create the (local) section dict so that we can override it as desired
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 09 Jun 2011 09:29:06 -0700 |
parents | 236af713bbc0 |
children | b9d9a94bfa19 |
files | pyloader/factory.py |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/pyloader/factory.py Thu Jun 09 09:25:54 2011 -0700 +++ b/pyloader/factory.py Thu Jun 09 09:29:06 2011 -0700 @@ -122,6 +122,9 @@ # split up the section identifier name, path = section.split(':', 1) + # make a dict for the section + sect = {} + # interpret decorators if ':' in path: wrapper, _path = path.split(':', 1) @@ -180,11 +183,12 @@ if overridden_section in seen: pass # TODO create_section(overridden_section, iniconfig[overridden_section]) - # TODO: options = config[path].copy() + # TODO: sect = config[path].copy() - # make a dict for the section - path = path % defaults - sect = dict(path=path) + if 'path' not in sect: + # add the path to section dict + path = path % defaults + sect['path'] = path # get arguments from .ini options for option, value in options.items():