diff options
author | Georg Brandl <georg@python.org> | 2006-05-18 07:01:27 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-05-18 07:01:27 (GMT) |
commit | 7b90e168f3d27f10cc087da2b9be1289722e7172 (patch) | |
tree | f2f5027e63e3a10ae21ee9abbf5d25dc57f45917 /Lib | |
parent | b678ce5aa67d890bb080df19fa35a232a19dac65 (diff) | |
download | cpython-7b90e168f3d27f10cc087da2b9be1289722e7172.zip cpython-7b90e168f3d27f10cc087da2b9be1289722e7172.tar.gz cpython-7b90e168f3d27f10cc087da2b9be1289722e7172.tar.bz2 |
Bug #1462152: file() now checks more thoroughly for invalid mode
strings and removes a possible "U" before passing the mode to the
C library function.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_file.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py index a9f5e46..53f9953 100644 --- a/Lib/test/test_file.py +++ b/Lib/test/test_file.py @@ -136,7 +136,7 @@ f.close() bad_mode = "qwerty" try: open(TESTFN, bad_mode) -except IOError, msg: +except ValueError, msg: if msg[0] != 0: s = str(msg) if s.find(TESTFN) != -1 or s.find(bad_mode) == -1: |