Don't write empty values.

This commit is contained in:
Aldo Cortesi 2012-07-10 16:34:39 +12:00
parent 721e2c8277
commit 4fdc2179e2

View File

@ -63,10 +63,11 @@ class FileLike:
return result
def write(self, v):
try:
return self.o.sendall(v)
except SSL.SysCallError:
raise NetLibDisconnect()
if v:
try:
return self.o.sendall(v)
except SSL.SysCallError:
raise NetLibDisconnect()
def readline(self, size = None):
result = ''