diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-21 08:54:16 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-21 08:54:16 -0500 |
commit | 63af28d0ee994b53fce75a89702acfa830d6e0a5 (patch) | |
tree | 69b63918167f2d5616b643d0e033770d1b200889 /coverage/templite.py | |
parent | 92278604cc979a6e034a371ef02f8c09abf69919 (diff) | |
download | python-coveragepy-63af28d0ee994b53fce75a89702acfa830d6e0a5.tar.gz |
There doesn't seem to be a way to raise an exception with an old traceback that works on both 2.x and 3.x, so lose the traceback.
Diffstat (limited to 'coverage/templite.py')
-rw-r--r-- | coverage/templite.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/coverage/templite.py b/coverage/templite.py index 64dc123..0654f29 100644 --- a/coverage/templite.py +++ b/coverage/templite.py @@ -123,10 +123,10 @@ class _TempliteEngine(object): try: self.result += str(self.evaluate(args)) except: - exc_class, exc, tb = sys.exc_info() + exc_class, exc, _ = sys.exc_info() new_exc = exc_class("Couldn't evaluate {{ %s }}: %s" % (args, exc)) - raise exc_class, new_exc, tb + raise new_exc elif op == 'if': expr, body = args if self.evaluate(expr): |