mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-46411: Remove unnecessary calls to sys.exc_info() in tests (GH-30638)
This commit is contained in:
parent
c47c9e6589
commit
a287b31bcb
6 changed files with 14 additions and 16 deletions
|
@ -12,8 +12,8 @@ import unittest
|
|||
def get_tb():
|
||||
try:
|
||||
raise OSError()
|
||||
except:
|
||||
return sys.exc_info()[2]
|
||||
except OSError as e:
|
||||
return e.__traceback__
|
||||
|
||||
|
||||
class Context:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue