equal
deleted
inserted
replaced
75 v = get(key) |
75 v = get(key) |
76 if not hasattr(v, '__iter__'): |
76 if not hasattr(v, '__iter__'): |
77 raise SyntaxError(_("error expanding '%s%%%s'") % (key, format)) |
77 raise SyntaxError(_("error expanding '%s%%%s'") % (key, format)) |
78 lm = map.copy() |
78 lm = map.copy() |
79 for i in v: |
79 for i in v: |
80 if isinstance(i, dict): |
80 if isinstance(i, dict): |
81 lm.update(i) |
81 lm.update(i) |
82 yield self.process(format, lm) |
82 yield self.process(format, lm) |
83 else: |
83 else: |
84 # v is not an iterable of dicts, this happen when 'key' |
84 # v is not an iterable of dicts, this happen when 'key' |
85 # has been fully expanded already and format is useless. |
85 # has been fully expanded already and format is useless. |
242 |
242 |
243 if isinstance(styles, str): |
243 if isinstance(styles, str): |
244 styles = [styles] |
244 styles = [styles] |
245 |
245 |
246 for style in styles: |
246 for style in styles: |
247 |
|
248 if not style: |
247 if not style: |
249 continue |
248 continue |
250 locations = [os.path.join(style, 'map'), 'map-' + style] |
249 locations = [os.path.join(style, 'map'), 'map-' + style] |
251 locations.append('map') |
250 locations.append('map') |
252 |
251 |