]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Return empty list when debug_info is empty string 673/head
authorMr. Senko <atodorov@mrsenko.com>
Sun, 29 Jan 2017 11:34:25 +0000 (13:34 +0200)
committerMr. Senko <atodorov@mrsenko.com>
Sun, 29 Jan 2017 11:34:25 +0000 (13:34 +0200)
jinja2/environment.py

index 2a4d3d7da9c7df4f7c3b48b0bc661a3f36d6b307..f3608a636cb6ca499ed434c2d32700250ed0fcd4 100644 (file)
@@ -1124,8 +1124,10 @@ class Template(object):
     @property
     def debug_info(self):
         """The debug info mapping."""
-        return [tuple(imap(int, x.split('='))) for x in
-                self._debug_info.split('&')]
+        if self._debug_info:
+            return [tuple(imap(int, x.split('='))) for x in
+                    self._debug_info.split('&')]
+        return []
 
     def __repr__(self):
         if self.name is None: