Skip to content

Commit

Permalink
Remove 'file_size' check from tests. The docstring indicates this par…
Browse files Browse the repository at this point in the history
…ameter is to be passed to the callback, and there's no reason to think this parameter is relevant in affecting whether a useful stat object has been passed (especially when the 'confirm' parameter is explicitly supplied for that decision. This fixes paramiko#142.
  • Loading branch information
jaraco committed Mar 4, 2013
1 parent a3fe422 commit 3cd7f58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paramiko/sftp_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def putfo(self, fl, remotepath, file_size=0, callback=None, confirm=True):
break
finally:
fr.close()
if confirm and file_size:
if confirm:
s = self.stat(remotepath)
if s.st_size != size:
raise IOError('size mismatch in put! %d != %d' % (s.st_size, size))
Expand Down

0 comments on commit 3cd7f58

Please sign in to comment.