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 15, 2015
1 parent e6ed8c7 commit 38691b8
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 38691b8

Please sign in to comment.