[pypy-svn] r73758 - pypy/trunk/pypy/module/_file

arigo at codespeak.net arigo at codespeak.net
Thu Apr 15 10:45:26 CEST 2010


Author: arigo
Date: Thu Apr 15 10:45:24 2010
New Revision: 73758

Modified:
   pypy/trunk/pypy/module/_file/interp_file.py
Log:
Fix for external callers of fdopenstream(), e.g. module/imp and module/bz2.


Modified: pypy/trunk/pypy/module/_file/interp_file.py
==============================================================================
--- pypy/trunk/pypy/module/_file/interp_file.py	(original)
+++ pypy/trunk/pypy/module/_file/interp_file.py	Thu Apr 15 10:45:24 2010
@@ -39,9 +39,11 @@
         self.clear_all_weakrefs()
         self.direct_close()
 
-    def fdopenstream(self, stream, fd, mode):
+    def fdopenstream(self, stream, fd, mode, w_name=None):
         self.fd = fd
         self.mode = mode
+        if w_name is not None:
+            self.w_name = w_name
         self.stream = stream
         if stream.flushable():
             getopenstreams(self.space)[stream] = None



More information about the Pypy-commit mailing list