[pypy-commit] pypy use-file-star-for-file: backout proper error handling here, as cpython doesn't do it
bdkearns
noreply at buildbot.pypy.org
Fri Sep 12 18:01:57 CEST 2014
Author: Brian Kearns <bdkearns at gmail.com>
Branch: use-file-star-for-file
Changeset: r73509:4fb50815c912
Date: 2014-09-12 12:01 -0400
http://bitbucket.org/pypy/pypy/changeset/4fb50815c912/
Log: backout proper error handling here, as cpython doesn't do it
diff --git a/rpython/rlib/rfile.py b/rpython/rlib/rfile.py
--- a/rpython/rlib/rfile.py
+++ b/rpython/rlib/rfile.py
@@ -445,14 +445,6 @@
result = c_fgets(raw_buf, BASE_LINE_SIZE, ll_file)
if not result:
- if c_ferror(ll_file):
- if rposix.get_errno() == errno.EINTR:
- if self._signal_checker is not None:
- self._signal_checker()
- c_clearerr(ll_file)
- return -1
- c_clearerr(ll_file)
- raise _from_errno(IOError)
c_clearerr(ll_file)
if self._signal_checker is not None:
self._signal_checker()
diff --git a/rpython/rlib/test/test_rfile.py b/rpython/rlib/test/test_rfile.py
--- a/rpython/rlib/test/test_rfile.py
+++ b/rpython/rlib/test/test_rfile.py
@@ -316,12 +316,15 @@
pass
else:
assert False
- try:
- f.readline()
- except IOError as e:
- pass
+ if os.name != 'nt':
+ try:
+ f.readline()
+ except IOError as e:
+ pass
+ else:
+ assert False
else:
- assert False
+ assert f.readline() == ''
try:
f.close()
except IOError as e:
More information about the pypy-commit
mailing list