Add integration tests for fetch/slurp, make powershell fetch/slurp work as close as possible to existing fetch/slurp modules.

This commit is contained in:
Chris Church 2014-06-18 16:10:10 -05:00 committed by Matt Martz
commit 243cd877ae
13 changed files with 403 additions and 44 deletions

View file

@ -608,9 +608,9 @@ def md5s(data):
return digest.hexdigest()
def md5(filename):
''' Return MD5 hex digest of local file, or None if file is not present. '''
''' Return MD5 hex digest of local file, None if file is not present or a directory. '''
if not os.path.exists(filename):
if not os.path.exists(filename) or os.path.isdir(filename):
return None
digest = _md5()
blocksize = 64 * 1024