Mercurial > hg > pyloader
comparison pyloader/factory.py @ 54:f724db086125
houston, we have a pyloader
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Wed, 08 Jun 2011 23:29:50 -0700 |
parents | e4a1d7eecd3b |
children | cc361ad8a692 |
comparison
equal
deleted
inserted
replaced
53:e4a1d7eecd3b | 54:f724db086125 |
---|---|
143 create_section(wrapper_section, iniconfig[wrapper_section]) | 143 create_section(wrapper_section, iniconfig[wrapper_section]) |
144 wrapper_options = config[wrapper].copy() | 144 wrapper_options = config[wrapper].copy() |
145 | 145 |
146 # TODO interpolate wrapper_options | 146 # TODO interpolate wrapper_options |
147 def interpolate(option): | 147 def interpolate(option): |
148 return option == object_string and wrapped_name or option | 148 if option == object_string: |
149 return '%(' + wrapped_name + ')s' | |
150 return option | |
149 if 'args' in wrapper_options: | 151 if 'args' in wrapper_options: |
150 args = wrapper_options['args'][:] | 152 args = wrapper_options['args'][:] |
151 args = [interpolate(i) for i in args] | 153 args = [interpolate(i) for i in args] |
152 wrapper_options['args'] = args | 154 wrapper_options['args'] = args |
153 if 'kwargs' in wrapper_options: | 155 if 'kwargs' in wrapper_options: |