Author: Brian Kearns <bdkea...@gmail.com>
Branch: use-file-star-for-file
Changeset: r73432:0bcc5f7964fd
Date: 2014-09-10 19:56 -0400
http://bitbucket.org/pypy/pypy/changeset/0bcc5f7964fd/

Log:    backout 1899f1699c85

diff --git a/pypy/module/sys/__init__.py b/pypy/module/sys/__init__.py
--- a/pypy/module/sys/__init__.py
+++ b/pypy/module/sys/__init__.py
@@ -104,6 +104,9 @@
     }
 
     def startup(self, space):
+        from pypy.module.sys.state import getio
+        getio(space).startup(space)
+
         if space.config.translating and not we_are_translated():
             # don't get the filesystemencoding at translation time
             assert self.filesystemencoding is None
diff --git a/pypy/module/sys/state.py b/pypy/module/sys/state.py
--- a/pypy/module/sys/state.py
+++ b/pypy/module/sys/state.py
@@ -34,15 +34,9 @@
 
 class IOState:
     def __init__(self, space):
-        self._cleanup_()
-
-    def _cleanup_(self):
-        self.w_stdin = self.w_stdout = self.w_stderr = None
+        pass
 
     def startup(self, space):
-        if self.w_stdout is not None:
-            return
-
         i, o, e = rfile.create_stdio()
 
         stdin = W_File(space)
@@ -58,9 +52,7 @@
         self.w_stderr = space.wrap(stderr)
 
 def getio(space):
-    io = space.fromcache(IOState)
-    io.startup(space)
-    return io
+    return space.fromcache(IOState)
 
 
 def pypy_getudir(space):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to