[pypy-svn] r8705 - pypy/dist/pypy/lib
arigo at codespeak.net
arigo at codespeak.net
Sat Jan 29 13:48:18 CET 2005
Author: arigo
Date: Sat Jan 29 13:48:18 2005
New Revision: 8705
Modified:
pypy/dist/pypy/lib/_sio.py
Log:
bug fix.
Modified: pypy/dist/pypy/lib/_sio.py
==============================================================================
--- pypy/dist/pypy/lib/_sio.py (original)
+++ pypy/dist/pypy/lib/_sio.py Sat Jan 29 13:48:18 2005
@@ -198,12 +198,11 @@
hit = self.mm.find("\n", self.pos) + 1
if not hit:
# is there more data to read?
- filesize = self.mm.size() # Actual file size, may be more than mapped
- if filesize <= len(self.mm):
- return ""
- # File grew since opened; remap to get the new data
- self.remapfile()
- hit = self.mm.find("\n", self.pos) + 1
+ filesize = self.mm.size() #Actual file size, may be more than mapped
+ if filesize > len(self.mm):
+ # File grew since opened; remap to get the new data
+ self.remapfile()
+ hit = self.mm.find("\n", self.pos) + 1
if hit:
# Got a whole line
data = self.mm[self.pos:hit]
More information about the Pypy-commit
mailing list