From: Mr. Senko Date: Sun, 29 Jan 2017 11:34:25 +0000 (+0200) Subject: Return empty list when debug_info is empty string X-Git-Tag: 2.11.0~27^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=432daeac23a1fe80d170b9fec102d4ca2618a9b9;p=thirdparty%2Fjinja.git Return empty list when debug_info is empty string --- 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: