fix(style): Fix style to match rest of project

This commit is contained in:
Jay Faulkner
2014-01-24 15:14:01 -08:00
parent 0217e5a5de
commit 69cebd1e48

View File

@@ -100,14 +100,19 @@ def _verify_image(image_info, image_location):
algo = getattr(hashlib, k, None)
if algo is None:
continue
log.debug('Verifying image', image=image_location, algo=k,
log.debug('Verifying image',
image=image_location,
algo=k,
passed_hash=v)
hash_ = algo(open(image_location).read()).hexdigest()
if hash_ == v:
return True
else:
log.warning('Image verification failed', image=image_location,
algo=k, imagehash=hash_, passed_hash=v)
log.warning('Image verification failed',
image=image_location,
algo=k,
imagehash=hash_,
passed_hash=v)
return False