From 432daeac23a1fe80d170b9fec102d4ca2618a9b9 Mon Sep 17 00:00:00 2001 From: "Mr. Senko" Date: Sun, 29 Jan 2017 13:34:25 +0200 Subject: [PATCH] Return empty list when debug_info is empty string --- jinja2/environment.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jinja2/environment.py b/jinja2/environment.py index 2a4d3d7d..f3608a63 100644 --- a/jinja2/environment.py +++ b/jinja2/environment.py @@ -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: -- 2.47.2