Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorConstantin Shalnev <c.shalnev@corp.mail.ru>2015-08-27 13:49:39 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 03:02:55 +0300
commit5949a02bbb8da9d04cf84140c25e09a79510fd63 (patch)
tree25d1514ea23862c3c879e32ab7f85021d6e00648 /tools
parent78485d6439c923e368869f1be79bfce2199fbf05 (diff)
Fixed report of line number and fixed Unicode exception on redundant transformation
Diffstat (limited to 'tools')
-rw-r--r--tools/kothic/mapcss/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/kothic/mapcss/__init__.py b/tools/kothic/mapcss/__init__.py
index a7aea62ef5..9efbff8694 100644
--- a/tools/kothic/mapcss/__init__.py
+++ b/tools/kothic/mapcss/__init__.py
@@ -318,6 +318,8 @@ class MapCSS():
else:
raise Exception("Unexpected construction: " + css)
+ stck[-1][1] = css # store remained part
+
if not wasBroken:
stck.pop()
@@ -329,7 +331,7 @@ class MapCSS():
filename = stck[-1][0] # filename
css_orig = stck[-1][2] # original
css = stck[-1][1] # remained
- line = unicode(css_orig[:-len(unicode(css))]).count("\n") + 1
+ line = css_orig[:-len(css)].count("\n") + 1
msg = str(e) + "\nFile: " + filename + "\nLine: " + str(line)
raise Exception(msg)