diff options
author | Abhinav <abhinav.chadha@tinyclues.com> | 2015-12-03 18:28:40 +0100 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2016-04-23 18:34:45 -0700 |
commit | 7b2931f040d824a7d5973b704b2835b842384667 (patch) | |
tree | 6294c7a67301b4520ff3a51cf5ee195754cd13e9 | |
parent | f9404c52c0a5899f9b998e2b52d2316b65202414 (diff) |
Update sftp_client.py
-rw-r--r-- | paramiko/sftp_client.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index f8c77042..b953526c 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -693,10 +693,10 @@ class SFTPClient(BaseSFTP, ClosingContextManager): data = fr.read(32768) fl.write(data) size += len(data) - if callback is not None: - callback(size, file_size) if len(data) == 0: break + if callback is not None: + callback(size, file_size) return size def get(self, remotepath, localpath, callback=None): |