Skip to content

Commit cc8ec9b

Browse files
jenkins-botGerrit Code Review
authored andcommitted
Merge "sync-tennis-stats: Bail out of number of players is too low"
2 parents f71f2e8 + a8c66e3 commit cc8ec9b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

majavahbot/tasks/task_sync_tennis_stats.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,17 @@ def download_and_parse(
102102
)
103103
)
104104

105+
LOGGER.info("Got data for %s players on %s", len(players), update_date)
105106
return players, update_date
106107

107108
def process_pdf(
108109
self, url: str, target_page: str, overrides: Dict[str, Dict[str, Any]]
109110
):
110111
players, update_date = self.download_and_parse(url, overrides)
112+
113+
if len(players) < 100:
114+
raise Exception("Got data for suspiciously few players!")
115+
111116
LOGGER.info("Formatting rankings for the required on-wiki format")
112117

113118
per_country: Dict[str, List[Dict[str, Any]]] = defaultdict(list)

0 commit comments

Comments
 (0)