[Zope-Checkins] CVS: Zope3/lib/python/Zope/Server - dual_mode_channel.py:1.1.2.5
Shane Hathaway
shane@digicool.com
Tue, 27 Nov 2001 14:20:34 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/Server
In directory cvs.zope.org:/tmp/cvs-serv30098
Modified Files:
Tag: Zope-3x-branch
dual_mode_channel.py
Log Message:
Expanded tests and fixed found bugs
=== Zope3/lib/python/Zope/Server/dual_mode_channel.py 1.1.2.4 => 1.1.2.5 ===
from_file = from_buffer.getfile()
read_pos = from_file.tell()
+ from_file.seek(0)
while 1:
data = from_file.read(COPY_BYTES)
if not data:
break
file.write(data)
- self.remain = file.tell() - read_pos
+ self.remain = int(file.tell() - read_pos)
+ from_file.seek(read_pos)
file.seek(read_pos)
def __len__(self):
@@ -299,7 +301,7 @@
else:
res = file.read(bytes)
if skip:
- self.remain = self.remain - len(res)
+ self.remain -= len(res)
else:
file.seek(read_pos)
return res