Browse Source

Fix "error parsing my_team.txt" when favourite team isn't playing

This probably works but it's going to be weeks until the Wings play again so I can't actually test it haha
main
Holly 1 year ago
parent
commit
0e05726a7c
1 changed files with 0 additions and 3 deletions
  1. +0
    -3
      idol_notifier.py

+ 0
- 3
idol_notifier.py View File

@ -74,9 +74,6 @@ def create_notification(idol, game, season, day):
if team in (g.home_team.full_name, g.away_team.full_name):
games.insert(0, games.pop(i))
break
else:
return 'Error parsing my_team.txt'
return f'{ordinal(games.index(game) + 1)} game on the page.'
home_or_away = 'home' if idol == game.home_pitcher else 'away'
notification_text = f'Games are over! New idol: {idol.player_name}, {home_or_away} pitcher for {game.away_team.nickname} at {game.home_team.nickname}.'


Loading…
Cancel
Save