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 | 4c342d0c040a493c3a93b2f25638a8ecea622067 (patch) | |
tree | 926a023b8b1380805d9c8d7b9f56e92c6f08c661 /coverage/templite.py | |
parent | c4c228fd7c7056ca4dc69391e16cc1832f9738a8 (diff) | |
download | python-coveragepy-git-4c342d0c040a493c3a93b2f25638a8ecea622067.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 64dc1232..0654f292 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): |