Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r70878:e205cdaeb95d
Date: 2014-04-22 18:25 -0700
http://bitbucket.org/pypy/pypy/changeset/e205cdaeb95d/

Log:    minor cleanup

diff --git a/pypy/module/_posixsubprocess/interp_subprocess.py 
b/pypy/module/_posixsubprocess/interp_subprocess.py
--- a/pypy/module/_posixsubprocess/interp_subprocess.py
+++ b/pypy/module/_posixsubprocess/interp_subprocess.py
@@ -1,12 +1,14 @@
-from rpython.rtyper.lltypesystem import rffi, lltype, llmemory
+import os
+import py
+
+from rpython.rtyper.lltypesystem import lltype, rffi
 from rpython.rtyper.tool import rffi_platform as platform
+from rpython.translator.tool.cbuild import ExternalCompilationInfo
+
+from pypy.interpreter.error import (
+    OperationError, exception_from_errno, oefmt, wrap_oserror)
+from pypy.interpreter.gateway import unwrap_spec
 from pypy.module.posix.interp_posix import run_fork_hooks
-from pypy.interpreter.gateway import unwrap_spec
-from pypy.interpreter.error import (
-    OperationError, exception_from_errno, wrap_oserror)
-from rpython.translator.tool.cbuild import ExternalCompilationInfo
-import py
-import os
 
 thisdir = py.path.local(__file__).dirpath()
 
@@ -80,8 +82,7 @@
     prev_fd = -1
     for fd in result:
         if fd < 0 or fd < prev_fd or fd > 1 << 30:
-            raise OperationError(space.w_ValueError, space.wrap(
-                    "bad value(s) in fds_to_keep"))
+            raise oefmt(space.w_ValueError, "bad value(s) in fds_to_keep")
     return result
 
 
@@ -116,8 +117,7 @@
     """
     close_fds = space.is_true(w_close_fds)
     if close_fds and errpipe_write < 3:  # precondition
-        raise OperationError(space.w_ValueError, space.wrap(
-                "errpipe_write must be >= 3"))
+        raise oefmt(space.w_ValueError, "errpipe_write must be >= 3")
     fds_to_keep = build_fd_sequence(space, w_fds_to_keep)
 
     # No need to disable GC in PyPy:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to