From ba7bf49a54223b940b773c8678ab8c60da12a155 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Tue, 27 Feb 2007 00:15:55 +0000 Subject: Remove the ability to slice/index on exceptions per PEP 352. --- Lib/test/test_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/test/test_file.py') diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py index 7eb052b3a0..a57ab43158 100644 --- a/Lib/test/test_file.py +++ b/Lib/test/test_file.py @@ -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) -- cgit v1.2.1