Skip to content

Commit

Permalink
Fix debug_info logic to avoid ValueError on empty _debug_info
Browse files Browse the repository at this point in the history
  • Loading branch information
Adriano Scoditti authored and kevin-brown committed May 6, 2019
1 parent fd89fed commit 633a8c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jinja2/environment.py
Expand Up @@ -1126,8 +1126,10 @@ def is_up_to_date(self):
@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:
Expand Down

0 comments on commit 633a8c1

Please sign in to comment.