fixing some small things

This commit is contained in:
brent s. 2021-01-21 13:12:50 -05:00
parent e8a75a42df
commit 7791832af8
Signed by: bts
GPG Key ID: 8C004C2F93481F6B
2 changed files with 5 additions and 1 deletions

View File

@ -69,6 +69,8 @@ class BaseUpdater(object):
if self.getRunning(): if self.getRunning():
return(None) return(None)
self.lock() self.lock()
self.getCurVer()
self.getNewVer()
if self.do_update or \ if self.do_update or \
self.force_update or not \ self.force_update or not \
all((self.old_date, all((self.old_date,

View File

@ -93,6 +93,7 @@ class Updater(_base.BaseUpdater):
if ver_info.get('arch') != self.arch: if ver_info.get('arch') != self.arch:
self.do_update = True self.do_update = True
self.force_update = True self.force_update = True
return(None)
if not os.path.isfile(self.dest_iso): if not os.path.isfile(self.dest_iso):
self.do_update = True self.do_update = True
self.force_update = True self.force_update = True
@ -101,10 +102,11 @@ class Updater(_base.BaseUpdater):
if self.old_hash != realhash: if self.old_hash != realhash:
self.do_update = True self.do_update = True
self.force_update = True self.force_update = True
return(None)
return(None) return(None)


def getNewVer(self): def getNewVer(self):
# We could do this a lot more reliably if # We could do this a lot more reliably if the mirrors all had the same HTML.
if self.getRunning(): if self.getRunning():
return(None) return(None)
req = requests.get(self.dl_base, headers = {'User-Agent': 'curl/7.74.0'}) req = requests.get(self.dl_base, headers = {'User-Agent': 'curl/7.74.0'})