Merge branch 'master' of ssh.github.com:cortesi/netlib

This commit is contained in:
Aldo Cortesi 2012-06-27 16:24:34 +12:00
commit 97071c0952
1 changed files with 2 additions and 1 deletions

View File

@ -17,7 +17,7 @@ class FileLike:
def read(self, length):
result = ''
while len(result) < length:
while length > 0:
try:
data = self.o.read(length)
except (SSL.ZeroReturnError, SSL.SysCallError):
@ -25,6 +25,7 @@ class FileLike:
if not data:
break
result += data
length -= len(data)
return result
def write(self, v):