Remove 'file_size' check from tests. The docstring indicates this parameter 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 #142.

This commit is contained in:
Jason R. Coombs 2013-03-04 08:46:39 -05:00
parent a3fe422198
commit 3cd7f585d0
1 changed files with 1 additions and 1 deletions

View File

@ -575,7 +575,7 @@ class SFTPClient (BaseSFTP):
break break
finally: finally:
fr.close() fr.close()
if confirm and file_size: if confirm:
s = self.stat(remotepath) s = self.stat(remotepath)
if s.st_size != size: if s.st_size != size:
raise IOError('size mismatch in put! %d != %d' % (s.st_size, size)) raise IOError('size mismatch in put! %d != %d' % (s.st_size, size))