Author: Matti Picus <[email protected]>
Branch:
Changeset: r94146:56c6bd396489
Date: 2018-03-27 13:26 +0300
http://bitbucket.org/pypy/pypy/changeset/56c6bd396489/
Log: raise OSError not IOError (py2.7, linux failing stdlib test)
diff --git a/pypy/module/posix/app_posix.py b/pypy/module/posix/app_posix.py
--- a/pypy/module/posix/app_posix.py
+++ b/pypy/module/posix/app_posix.py
@@ -94,7 +94,7 @@
try:
posix.fstat(fd)
except OSError as e:
- raise IOError(e.errno, e.message)
+ raise OSError(e.errno, e.message)
return _fdopen(fd, mode, buffering)
else:
diff --git a/pypy/module/posix/test/test_posix2.py
b/pypy/module/posix/test/test_posix2.py
--- a/pypy/module/posix/test/test_posix2.py
+++ b/pypy/module/posix/test/test_posix2.py
@@ -303,7 +303,7 @@
try:
fid = posix.fdopen(fd)
fid.read(10)
- except IOError as e:
+ except OSError as e:
assert e.errno == errno.EBADF
else:
assert False, "using result of fdopen(fd) on closed file must
raise"
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit