[pypy-svn] pypy fast-forward: Fix translation

amauryfa commits-noreply at bitbucket.org
Fri Jan 7 20:56:57 CET 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: fast-forward
Changeset: r40472:343b1b6a14f9
Date: 2011-01-07 20:55 +0100
http://bitbucket.org/pypy/pypy/changeset/343b1b6a14f9/

Log:	Fix translation

diff --git a/pypy/module/fcntl/interp_fcntl.py b/pypy/module/fcntl/interp_fcntl.py
--- a/pypy/module/fcntl/interp_fcntl.py
+++ b/pypy/module/fcntl/interp_fcntl.py
@@ -158,8 +158,7 @@
     if has_flock:
         rv = c_flock(fd, op)
         if rv < 0:
-            raise OperationError(space.w_IOError,
-                space.wrap(_get_error_msg()))
+            raise _get_error(space, "flock")
     else:
         l = _check_flock_op(space, op)
         rffi.setintfield(l, 'c_l_whence', 0)
@@ -249,8 +248,7 @@
             arg = rffi.charpsize2str(ll_arg, len(arg))
             lltype.free(ll_arg, flavor='raw')
             if rv < 0:
-                raise OperationError(space.w_IOError,
-                    space.wrap(_get_error_msg()))
+                raise _get_error(space, "ioctl")
             rwbuffer.setslice(0, arg)
             return space.wrap(rv)
 
@@ -274,8 +272,7 @@
         arg = rffi.charpsize2str(ll_arg, len(arg))
         lltype.free(ll_arg, flavor='raw')
         if rv < 0:
-            raise OperationError(space.w_IOError,
-                space.wrap(_get_error_msg()))
+            raise _get_error(space, "ioctl")
         return space.wrap(arg)
 
     raise OperationError(space.w_TypeError,


More information about the Pypy-commit mailing list