summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorKristján Valur Jónsson <kristjan@ccpgames.com>2009-02-04 10:05:25 +0000
committerKristján Valur Jónsson <kristjan@ccpgames.com>2009-02-04 10:05:25 +0000
commitfd4c872726e650f1e43c4eed4fa7e7e326b3fee6 (patch)
tree511e8c21bc40e5d71c8fd2328ff7fdbca2db8c11 /Lib
parent8bdd3b3dcf38ba1b5bd460b3c309fb6a8ea1127c (diff)
downloadcpython-git-fd4c872726e650f1e43c4eed4fa7e7e326b3fee6.tar.gz
issue 4804: Provide checks for the format string of strftime, and for the "mode" string of fopen on Windows. These strings are user provided from python and so we can avoid invoking the C runtime invalid parameter handler by first checking that they are valid.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_file.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py
index b4f494ba96..a134a89c05 100644
--- a/Lib/test/test_file.py
+++ b/Lib/test/test_file.py
@@ -154,7 +154,7 @@ class OtherFileTests(unittest.TestCase):
for name in (TESTFN, unicode(TESTFN), unicode(TESTFN + '\t')):
try:
f = open(name, "rr")
- except IOError:
+ except (IOError, ValueError):
pass
else:
f.close()