Skip to content

Commit

Permalink
fix: add try except for awards fetch
Browse files Browse the repository at this point in the history
Signed-off-by: Dup4 <lyuzhi.pan@gmail.com>
  • Loading branch information
Dup4 committed Nov 11, 2023
1 parent 6ac877e commit f0e05a9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/dump-to-xcpcio/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ def upload_all(c: Config, d: Dump):
extra_files = {}

contest = dump(d, '', 'contest.json', extra_files)
awards = dump(d, 'awards', 'awards.json', extra_files)

try:
awards = dump(d, 'awards', 'awards.json', extra_files)
except Exception as e:
d.logger.error(e)
extra_files["awards.json"] = "[]"

scoreboard = dump(d, 'scoreboard', 'scoreboard.json', extra_files)

groups = dump(d, 'groups', 'groups.json', extra_files)
Expand Down

0 comments on commit f0e05a9

Please sign in to comment.