Merge pull request #1492 from tannewt/board_info_fix

Fix board info script to skip removed boards.
This commit is contained in:
Dan Halbert 2019-01-24 14:37:55 -05:00 committed by GitHub
commit 6be4b07e17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,7 +162,10 @@ def update_downloads(boards, release):
assets = response.json()["assets"] assets = response.json()["assets"]
for asset in assets: for asset in assets:
boards[asset["name"].split("-")[2]]["download_count"] += asset["download_count"] board_name = asset["name"].split("-")[2]
if board_name not in boards:
continue
boards[board_name]["download_count"] += asset["download_count"]
def print_active_user(): def print_active_user():