diff options
-rw-r--r-- | jinja2/exceptions.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/jinja2/exceptions.py b/jinja2/exceptions.py index 8d744c6..c9df6dc 100644 --- a/jinja2/exceptions.py +++ b/jinja2/exceptions.py @@ -27,6 +27,8 @@ class TemplateError(Exception): if message is not None: return message.decode('utf-8', 'replace') + def __unicode__(self): + return self.message or u'' else: def __init__(self, message=None): Exception.__init__(self, message) |