Apply put() version of #90
This commit is contained in:
parent
9c0d467667
commit
2cbe383080
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue