Skip to content

Commit

Permalink
dont stop importing games if exception occurs
Browse files Browse the repository at this point in the history
send mail instead
  • Loading branch information
djbrown committed Oct 3, 2020
1 parent dd522d4 commit e196184
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/games/management/commands/import_games.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ def import_league(self, league: League):

game_rows = tree.xpath("//table[@class='gametable']/tr[position() > 1]")
for game_row in game_rows:
self.import_game(game_row, league)
try:
self.import_game(game_row, league)
except Exception:
logging.getLogger('mail').exception("Could not import Game")

def import_game(self, game_row, league: League):

Expand Down

0 comments on commit e196184

Please sign in to comment.