From 8a36479cdbbb354b3579ac35cb58ff40ab07b131 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Jan 15 2019 15:51:19 +0000 Subject: fix undefined var --- diff --git a/vm/kojikamid.py b/vm/kojikamid.py index 77b9f9b..d962050 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):