From 8a36479cdbbb354b3579ac35cb58ff40ab07b131 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Tue, 4 Dec 2018 22:49:37 -0500 Subject: [PATCH] fix undefined var --- vm/kojikamid.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vm/kojikamid.py b/vm/kojikamid.py index 77b9f9b7..d9620505 100755 --- a/vm/kojikamid.py +++ b/vm/kojikamid.py @@ -333,9 +333,10 @@ class WindowsBuild(object): if 'checksum_type' in fileinfo: checksum.update(data) # rpms don't have a md5sum in the fileinfo, but check it for everything else - if 'checksum' in fileinfo and fileinfo['checksum'] != checksum.hexdigest(): + digest = checksum.hexdigest() + if 'checksum' in fileinfo and fileinfo['checksum'] != digest: raise BuildError('checksum validation failed for %s, %s (computed) != %s (provided)' % \ - (destpath, checksum.hexdigest(), fileinfo['checksum'])) + (destpath, digest, fileinfo['checksum'])) self.logger.info('Retrieved %s (%s bytes, md5: %s)', destpath, offset, digest) def fetchBuildReqs(self):