mirror of https://git.48k.eu/ogclient
utils: add logging for checksum validation
Display if checksum validation is correct or not.master
parent
8661a99a36
commit
7d26f0f69b
|
@ -67,9 +67,15 @@ def tip_check_csum(tip_addr, image_name):
|
|||
|
||||
cache_csum = _compute_md5(image_path)
|
||||
remote_csum = tip_fetch_csum(tip_addr, image_name)
|
||||
logging.debug(f'cache_csum: {cache_csum}')
|
||||
logging.debug(f'remote_csum: {remote_csum}')
|
||||
return cache_csum == remote_csum
|
||||
|
||||
if cache_csum == remote_csum:
|
||||
ret = True
|
||||
logging.info(f'Checksum is OK for {image_name}.img')
|
||||
else:
|
||||
ret = False
|
||||
logging.warn(f'Checksum mismatch for {image_name}.img')
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
def tip_client_get(tip_addr, image_name):
|
||||
|
|
Loading…
Reference in New Issue