From: Benjamin Peterson Date: Fri, 13 Nov 2009 22:09:10 +0000 (+0000) Subject: use with_traceback correctly X-Git-Tag: v3.2a1~2197 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=589c2d39c70b5695ed3447769939cc4e6cc660a8;p=thirdparty%2FPython%2Fcpython.git use with_traceback correctly --- diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py index ed17b6e5e2aa..4f9c49665a31 100644 --- a/Lib/unittest/case.py +++ b/Lib/unittest/case.py @@ -117,8 +117,7 @@ class _AssertRaisesContext(object): # let unexpected exceptions pass through return False #store exception, without traceback, for later retrieval - self.exc_value = exc_value - self.exc_value.with_traceback(None) + self.exc_value = exc_value.with_traceback(None) if self.expected_regex is None: return True