Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find_updates: return in ALL the appropriate failure cases #2052

Merged
merged 1 commit into from Apr 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion sopel/modules/find_updates.py
Expand Up @@ -67,8 +67,14 @@ def check_version(bot):
except ValueError:
# TODO: use JSONDecodeError when dropping Pythons < 3.5
_check_failed(bot)
success = False

if not success and bot.memory.get('update_failures', 0) > 4:
if not success:
if bot.memory.get('update_failures', 0) <= 4:
# not enough failures to worry; silently ignore this one
return

# too many failures to ignore; notify owner
bot.say(
"[update] I haven't been able to check for updates in a while. "
"Please verify that {} is working and I can reach it."
Expand Down