gh-102799: remove unnecessary calls to sys.exc_info() in tests (#102800)

This commit is contained in:
Irit Katriel 2023-03-18 07:19:38 +00:00 committed by GitHub
parent 72186aa637
commit b3cc11a08e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 124 additions and 124 deletions

View file

@ -5492,10 +5492,10 @@ class TCPTimeoutTest(SocketTCPTest):
self.fail("caught timeout instead of Alarm")
except Alarm:
pass
except:
except BaseException as e:
self.fail("caught other exception instead of Alarm:"
" %s(%s):\n%s" %
(sys.exc_info()[:2] + (traceback.format_exc(),)))
(type(e), e, traceback.format_exc()))
else:
self.fail("nothing caught")
finally: