summaryrefslogtreecommitdiffstats
path: root/src/utils/tiptorrent.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/tiptorrent.py')
-rw-r--r--src/utils/tiptorrent.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/utils/tiptorrent.py b/src/utils/tiptorrent.py
index 83ca052..1d628c1 100644
--- a/src/utils/tiptorrent.py
+++ b/src/utils/tiptorrent.py
@@ -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):