From 7f2109cf041e9ccdf8cfad84f42da35273798797 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 27 Jan 2020 17:59:40 +1000 Subject: [PATCH] tolerate branch idx out of range Branches can't be deleted at the moment, but this may change in the future. --- qt/aqt/addons.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt/aqt/addons.py b/qt/aqt/addons.py index 6b88fa80d..3a43acef9 100644 --- a/qt/aqt/addons.py +++ b/qt/aqt/addons.py @@ -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: