mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
Remove the ability to slice/index on exceptions per PEP 352.
This commit is contained in:
parent
44c526174d
commit
ba7bf49a54
8 changed files with 16 additions and 46 deletions
|
@ -156,7 +156,7 @@ class OtherFileTests(unittest.TestCase):
|
|||
try:
|
||||
f = open(TESTFN, bad_mode)
|
||||
except ValueError as msg:
|
||||
if msg[0] != 0:
|
||||
if msg.message != 0:
|
||||
s = str(msg)
|
||||
if s.find(TESTFN) != -1 or s.find(bad_mode) == -1:
|
||||
self.fail("bad error message for invalid mode: %s" % s)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue