aboutsummaryrefslogtreecommitdiffstats
path: root/mako/pyparser.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-11-11 15:16:22 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2012-11-11 15:16:22 -0500
commit3bbeaef7d5576fcefd1ccec3661ce7e3fd454094 (patch)
tree446a6b17199a0d722234bafb04ca95a1860c4644 /mako/pyparser.py
parentf298b36d4e940b1f9e737a64bbd06182da9794fa (diff)
downloadexternal_python_mako-3bbeaef7d5576fcefd1ccec3661ce7e3fd454094.tar.gz
external_python_mako-3bbeaef7d5576fcefd1ccec3661ce7e3fd454094.tar.bz2
external_python_mako-3bbeaef7d5576fcefd1ccec3661ce7e3fd454094.zip
py2.5 works
Diffstat (limited to 'mako/pyparser.py')
-rw-r--r--mako/pyparser.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mako/pyparser.py b/mako/pyparser.py
index 7dde1f9..f772dae 100644
--- a/mako/pyparser.py
+++ b/mako/pyparser.py
@@ -51,11 +51,11 @@ def parse(code, mode='exec', **exception_kwargs):
if isinstance(code, compat.text_types):
code = code.encode('ascii', 'backslashreplace')
return compiler_parse(code, mode)
- except Exception as e:
+ except Exception:
raise exceptions.SyntaxException(
"(%s) %s (%r)" % (
- e.__class__.__name__,
- e,
+ compat.exception_as().__class__.__name__,
+ compat.exception_as(),
code[0:50]
), **exception_kwargs)