]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Unified constructor for template errors between 2.x and 3.x
authorArmin Ronacher <armin.ronacher@active-4.com>
Mon, 20 May 2013 01:18:47 +0000 (02:18 +0100)
committerArmin Ronacher <armin.ronacher@active-4.com>
Mon, 20 May 2013 01:18:47 +0000 (02:18 +0100)
jinja2/exceptions.py

index fce01ed7ba53a066a7c2c6584b95e1b0570202a2..8d744c62d1dae01b870462c5a2b34b7ef731dd33 100644 (file)
@@ -28,6 +28,9 @@ class TemplateError(Exception):
                     return message.decode('utf-8', 'replace')
 
     else:
+        def __init__(self, message=None):
+            Exception.__init__(self, message)
+
         @property
         def message(self):
             if self.args: