diff options
Diffstat (limited to 'Lib/test/sortperf.py')
-rw-r--r-- | Lib/test/sortperf.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/sortperf.py b/Lib/test/sortperf.py index a370ed90ee..90722f7abc 100644 --- a/Lib/test/sortperf.py +++ b/Lib/test/sortperf.py @@ -22,7 +22,7 @@ def randfloats(n): fn = os.path.join(td, "rr%06d" % n) try: fp = open(fn, "rb") - except IOError: + except OSError: r = random.random result = [r() for i in range(n)] try: @@ -37,7 +37,7 @@ def randfloats(n): os.unlink(fn) except OSError: pass - except IOError as msg: + except OSError as msg: print("can't write", fn, ":", msg) else: result = marshal.load(fp) |