summaryrefslogtreecommitdiff
path: root/repoze/bfg/chameleon_text.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2010-01-06 02:46:54 +0000
committerChris McDonough <chrism@agendaless.com>2010-01-06 02:46:54 +0000
commit3ebf0287eeb8c269a7a3b35ee1441d1b07118d7f (patch)
tree2c6a500eaa4408cb26b4d2dffd7a2eb685adc2d8 /repoze/bfg/chameleon_text.py
parent9544d0f3406ae7994251577a8c087efc0ec907cc (diff)
downloadpyramid-3ebf0287eeb8c269a7a3b35ee1441d1b07118d7f.tar.gz
pyramid-3ebf0287eeb8c269a7a3b35ee1441d1b07118d7f.tar.bz2
pyramid-3ebf0287eeb8c269a7a3b35ee1441d1b07118d7f.zip
- Show the derived abspath of template resource specifications in the
traceback when a renderer template cannot be found. - Show the original traceback when a Chameleon template cannot be rendered due to a platform incompatibility.
Diffstat (limited to 'repoze/bfg/chameleon_text.py')
-rw-r--r--repoze/bfg/chameleon_text.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/repoze/bfg/chameleon_text.py b/repoze/bfg/chameleon_text.py
index 85f0126b3..f1dc8e3aa 100644
--- a/repoze/bfg/chameleon_text.py
+++ b/repoze/bfg/chameleon_text.py
@@ -1,14 +1,17 @@
+import sys
+
from webob import Response
from zope.interface import implements
try:
from chameleon.core.template import TemplateFile
-except ImportError, why: # pragma: no cover
+except ImportError: # pragma: no cover
+ exc_class, exc, tb = sys.exc_info()
# Chameleon doesn't work on non-CPython platforms
class TemplateFile(object):
def __init__(self, *arg, **kw):
- raise ImportError(why[0])
+ raise ImportError, exc, tb
try:
from chameleon.zpt.language import Parser