From 63af28d0ee994b53fce75a89702acfa830d6e0a5 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 21 Nov 2009 08:54:16 -0500 Subject: 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. --- coverage/templite.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'coverage/templite.py') 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): -- cgit v1.2.1