fix(style): Fix style to match rest of project
This commit is contained in:
@@ -100,14 +100,19 @@ def _verify_image(image_info, image_location):
|
|||||||
algo = getattr(hashlib, k, None)
|
algo = getattr(hashlib, k, None)
|
||||||
if algo is None:
|
if algo is None:
|
||||||
continue
|
continue
|
||||||
log.debug('Verifying image', image=image_location, algo=k,
|
log.debug('Verifying image',
|
||||||
|
image=image_location,
|
||||||
|
algo=k,
|
||||||
passed_hash=v)
|
passed_hash=v)
|
||||||
hash_ = algo(open(image_location).read()).hexdigest()
|
hash_ = algo(open(image_location).read()).hexdigest()
|
||||||
if hash_ == v:
|
if hash_ == v:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
log.warning('Image verification failed', image=image_location,
|
log.warning('Image verification failed',
|
||||||
algo=k, imagehash=hash_, passed_hash=v)
|
image=image_location,
|
||||||
|
algo=k,
|
||||||
|
imagehash=hash_,
|
||||||
|
passed_hash=v)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user