Author: Manuel Jacob Branch: Changeset: r61505:b82871fad050 Date: 2013-02-21 00:30 +0100 http://bitbucket.org/pypy/pypy/changeset/b82871fad050/
Log: Remove verify_fd from interp_fileio and replace it with a call to rposix.validate_fd(). diff --git a/pypy/module/_io/interp_fileio.py b/pypy/module/_io/interp_fileio.py --- a/pypy/module/_io/interp_fileio.py +++ b/pypy/module/_io/interp_fileio.py @@ -3,6 +3,7 @@ from pypy.interpreter.error import OperationError, wrap_oserror, wrap_oserror2 from rpython.rlib.rarithmetic import r_longlong from rpython.rlib.rstring import StringBuilder +from rpython.rlib.rposix import validate_fd from os import O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_TRUNC import sys, os, stat, errno from pypy.module._io.interp_iobase import W_RawIOBase, convert_size @@ -117,9 +118,6 @@ return currentsize + BIGCHUNK return currentsize + SMALLCHUNK -def verify_fd(fd): - return - class W_FileIO(W_RawIOBase): def __init__(self, space): W_RawIOBase.__init__(self, space) @@ -156,7 +154,7 @@ fd_is_own = False try: if fd >= 0: - verify_fd(fd) + validate_fd(fd) try: os.fstat(fd) except OSError, e: @@ -237,7 +235,7 @@ self.fd = -1 try: - verify_fd(fd) + validate_fd(fd) os.close(fd) except OSError, e: raise wrap_oserror(space, e, _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit