Skip to content

Commit

Permalink
allow eval expressions for icon-image and fill-image
Browse files Browse the repository at this point in the history
If those tags contained an eval expression those would erroneously be taken as
a filename, leading to a parse error. Simply check if the expression is an eval
before calling the filename handling.

This does not make it really work, but it at least not crash.
  • Loading branch information
DerDakon committed Oct 5, 2015
1 parent 9af3db3 commit b62aab3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mapcss_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def style_statement_as_js(self, subpart):
value_tags.add(val)
return " s_%s[%s] = MapCSS.e_localize(tags, %s);" % (subpart, k, val)
else:
if self.key in ('icon-image', 'fill-image'):
if not isinstance(self.value, ast.Eval) and self.key in ('icon-image', 'fill-image'):
images.add(self.value)
return " s_%s[%s] = %s;" % (subpart, k, val)

Expand Down

0 comments on commit b62aab3

Please sign in to comment.