Check for updates now works from the menu bar too

This commit is contained in:
2015-02-26 10:26:46 -06:00
parent b7193d16ee
commit 3a9a49d64c
4 changed files with 13 additions and 7 deletions

View File

@@ -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)

View File

@@ -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