misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
Simone Margaritelli 2019-10-20 18:39:01 +02:00
parent 916be1f63e
commit 26bb5d6183
No known key found for this signature in database
GPG Key ID: 82E42E7F3B34C97E

@ -48,8 +48,8 @@ def check(version, repo, native=True):
for asset in latest['assets']:
download_url = asset['browser_download_url']
if download_url.endswith('.zip') and (arch in download_url or is_arm and 'armhf' in download_url):
logging.info("found new update: %s" % download_url)
info['url'] = download_url
break
return info
@ -84,6 +84,7 @@ def on_internet_available(agent):
for repo, local_version, is_native in to_check:
info = check(local_version, repo, is_native)
if info['url'] is not None:
logging.warning("new update for %s is available: %s" % (repo, info['url']))
to_install.append(info)
if len(to_install) > 0 and OPTIONS['install']: