Skip to content

Commit

Permalink
fix(auto_update): fix auto_update which download the same version again
Browse files Browse the repository at this point in the history
  • Loading branch information
clementb49 committed Jun 10, 2024
1 parent d3c963f commit 0b9e441
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions basilisk/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,13 +439,14 @@ def automatic_update_check(
log.info("Last update check was not today")
try:
update_available = updater.is_update_available()
if not update_available:
log.info("No update available")
conf.general.last_update_check = datetime.now()
conf.save()
if notify_update_callback and update_available:
log.info("Update available")
notify_update_callback(updater)
conf.general.last_update_check = datetime.now()
conf.save()
if not update_available:
log.info("No update available")
return None
return updater
except Exception as e:
log.error(f"Error checking for updates: {e}")
Expand Down

0 comments on commit 0b9e441

Please sign in to comment.