From bbe9e2497bc3a568abd436c421d0854c3cb89796 Mon Sep 17 00:00:00 2001 From: brent s Date: Sat, 23 Jan 2021 01:39:23 -0500 Subject: [PATCH] hotfix for ipxe checksum chicanery --- ipxe.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ipxe.py b/ipxe.py index e7f5a3d..69171da 100755 --- a/ipxe.py +++ b/ipxe.py @@ -83,7 +83,8 @@ class Updater(_base.BaseUpdater): self.old_hash = ver_info.get(self.hash_type) self.old_ver = datetime.datetime.strptime(ver_info['ver'], self._datever_fmt) self.variant = ver_info.get('variant', self.variant) - self.new_hash = self.old_hash + # We do this to avoid the hash check in _base.BaseUpdater.download() + self._new_hash = self.old_hash self.new_date = self.old_date self.new_ver = self.old_ver if ver_info.get('arch') != self.arch: @@ -161,11 +162,11 @@ class Updater(_base.BaseUpdater): if self.getRunning(): return(None) if any((self.do_update, self.force_update)): - self.new_hash = self.getISOHash() + self._new_hash = self.getISOHash() d = {'date': self.new_date.strftime(self._date_fmt), 'variant': self.variant, 'ver': self.new_ver.strftime(self._datever_fmt), - self.hash_type: self.new_hash} + self.hash_type: self._new_hash} j = json.dumps(d, indent = 4) with open(self.dest_ver, 'w') as fh: fh.write(j)