tolerate branch idx out of range

Branches can't be deleted at the moment, but this may change in the
future.
This commit is contained in:
Damien Elmes 2020-01-27 17:59:40 +10:00
parent cb7a483d32
commit 7f2109cf04

View File

@ -1171,7 +1171,10 @@ def extract_update_info(
) -> UpdateInfo:
"Process branches to determine the updated mod time and min/max versions."
branches = info_json["branches"]
current = branches[current_branch_idx]
try:
current = branches[current_branch_idx]
except IndexError:
current = branches[0]
last_mod = 0
for branch in branches: