autopkgtest.py: both checksums need to be strings

This commit is contained in:
Brian Murray 2024-06-25 14:50:50 -07:00
parent 7d997562a0
commit 4e3ee76caf

View File

@ -185,9 +185,9 @@ class AutopkgtestPolicy(BasePolicy):
break
local_db_sha.update(data)
f_out.write(data)
if http_code and local_db_sha.hexdigest() != chksum:
if http_code and local_db_sha.hexdigest() != str(chksum):
self.logger.info("autopkgtest.db local chksum is %s" % local_db_sha.hexdigest())
self.logger.info("autopkgtest.db downloaded chksum is %s" % chksum)
self.logger.info("autopkgtest.db downloaded chksum is %s" % str(chksum))
self.logger.info("autopkgtest.db local checksum does not match downloaded checksum!")
os.unlink(new_file)
else: