Commits

Manuel Jacob committed b82871f

Remove verify_fd from interp_fileio and replace it with a call to rposix.validate_fd().

Comments (0)

Files changed (1)

pypy/module/_io/interp_fileio.py

 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
             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)
         fd_is_own = False
         try:
             if fd >= 0:
-                verify_fd(fd)
+                validate_fd(fd)
                 try:
                     os.fstat(fd)
                 except OSError, e:
         self.fd = -1
 
         try:
-            verify_fd(fd)
+            validate_fd(fd)
             os.close(fd)
         except OSError, e:
             raise wrap_oserror(space, e,