mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-07-17 13:46:07 -04:00
Check for updates now works from the menu bar too
This commit is contained in:
@@ -19,11 +19,11 @@ def perform_update(endpoint, current_version, app_name='', password=None, update
|
||||
available_update = find_update(endpoint, requests_session=requests_session)
|
||||
if not available_update:
|
||||
logger.debug("No update available")
|
||||
return
|
||||
return False
|
||||
available_version = available_update['current_version']
|
||||
if not str(available_version) > str(current_version) or platform.system()+platform.architecture()[0][:2] not in available_update['downloads']:
|
||||
logger.debug("No update for this architecture")
|
||||
return
|
||||
return False
|
||||
available_description = available_update.get('description', None)
|
||||
update_url = available_update ['downloads'][platform.system()+platform.architecture()[0][:2]]
|
||||
logger.info("A new update is available. Version %s" % available_version)
|
||||
|
@@ -6,6 +6,6 @@ from wxUpdater import *
|
||||
|
||||
def do_update():
|
||||
# try:
|
||||
update.perform_update(endpoint=application.update_url, current_version=application.version, app_name=application.name, update_available_callback=available_update_dialog, progress_callback=progress_callback, update_complete_callback=update_finished)
|
||||
return update.perform_update(endpoint=application.update_url, current_version=application.version, app_name=application.name, update_available_callback=available_update_dialog, progress_callback=progress_callback, update_complete_callback=update_finished)
|
||||
# except:
|
||||
# pass
|
Reference in New Issue
Block a user