From b62aab30b81610a904a87e4667c2d35da00238c7 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Sun, 9 Aug 2015 15:03:47 +0200 Subject: [PATCH] allow eval expressions for icon-image and fill-image 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. --- mapcss_converter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mapcss_converter.py b/mapcss_converter.py index ee90039..516466e 100755 --- a/mapcss_converter.py +++ b/mapcss_converter.py @@ -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)