summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-05-20 11:35:50 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-05-20 11:35:50 -0400
commitc094a8adaac6aff481c9708fe91d71fae21cad87 (patch)
tree7e7b44b54ff2e5b4fa05961b188de37e6bb5ca4a
parentb9609367bfe4177f78d2f891c30659e33b9b4c52 (diff)
downloadmako-c094a8adaac6aff481c9708fe91d71fae21cad87.tar.gz
- ensure all line numbers are integers
-rw-r--r--mako/template.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mako/template.py b/mako/template.py
index c19a66a..39ff8bd 100644
--- a/mako/template.py
+++ b/mako/template.py
@@ -602,9 +602,11 @@ class ModuleInfo(object):
r"__M_BEGIN_METADATA(.+?)__M_END_METADATA",
module_source, re.S).group(1)
source_map = compat.json.loads(source_map)
+ source_map['line_map'] = dict((int(k), int(v))
+ for k, v in source_map['line_map'].items())
if full_line_map:
line_map = source_map['full_line_map'] = dict(
- (int(k), v) for k, v in source_map['line_map'].items()
+ (k, v) for k, v in source_map['line_map'].items()
)
for mod_line in reversed(sorted(line_map)):