Jelajahi Sumber

idf_tools: print additional info when download verification fails

Ivan Grokhotkov 6 tahun lalu
induk
melakukan
1a2bf4d8ff
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      tools/idf_tools.py

+ 2 - 2
tools/idf_tools.py

@@ -559,10 +559,10 @@ class IDFTool(object):
         expected_size = download_obj.size
         file_size, file_sha256 = get_file_size_sha256(local_path)
         if file_size != expected_size:
-            warn('file size mismatch for {0}'.format(local_path))
+            warn('file size mismatch for {}, expected {}, got {}'.format(local_path, expected_size, file_size))
             return False
         if file_sha256 != expected_sha256:
-            warn('hash mismatch for {0}'.format(local_path))
+            warn('hash mismatch for {}, expected {}, got {}'.format(local_path, expected_sha256, file_sha256))
             return False
         return True