use with_traceback correctly

This commit is contained in:
Benjamin Peterson 2009-11-13 22:09:10 +00:00
parent 060cee221b
commit 589c2d39c7
1 changed files with 1 additions and 2 deletions

View File

@ -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