[pypy-svn] r15143 - pypy/dist/pypy/tool

arigo at codespeak.net arigo at codespeak.net
Tue Jul 26 20:11:10 CEST 2005


Author: arigo
Date: Tue Jul 26 20:11:09 2005
New Revision: 15143

Modified:
   pypy/dist/pypy/tool/osfilewrapper.py
Log:
Bug fix in OsFileWrapper.write() -- not easy to test partial write()s...


Modified: pypy/dist/pypy/tool/osfilewrapper.py
==============================================================================
--- pypy/dist/pypy/tool/osfilewrapper.py	(original)
+++ pypy/dist/pypy/tool/osfilewrapper.py	Tue Jul 26 20:11:09 2005
@@ -23,8 +23,7 @@
         towrite = len(buf)
         while writecount < towrite:
             # os.write will raise an error itself
-            writecount += os.write(self.fd, buf)
-            buf = buf[writecount:]
+            writecount += os.write(self.fd, buf[writecount:])
 
     def close(self):
         os.close(self.fd)



More information about the Pypy-commit mailing list