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():
return(None)
self.lock()
self.getCurVer()
self.getNewVer()
if self.do_update or \
self.force_update or not \
all((self.old_date,

View File

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

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():
return(None)
req = requests.get(self.dl_base, headers = {'User-Agent': 'curl/7.74.0'})