Apply put() version of #90

This commit is contained in:
Jeff Forcier 2012-11-29 16:16:35 -08:00
parent 9c0d467667
commit 2cbe383080
1 changed files with 2 additions and 2 deletions

View File

@ -567,12 +567,12 @@ class SFTPClient (BaseSFTP):
try: try:
while True: while True:
data = fl.read(32768) data = fl.read(32768)
if len(data) == 0:
break
fr.write(data) fr.write(data)
size += len(data) size += len(data)
if callback is not None: if callback is not None:
callback(size, file_size) callback(size, file_size)
if len(data) == 0:
break
finally: finally:
fr.close() fr.close()
if confirm and file_size: if confirm and file_size: