From d9b6f1a7478d77d7316adfcef3fead92e8c8a3d0 Mon Sep 17 00:00:00 2001 From: Arnaud de Mouhy Date: Mon, 13 Oct 2025 15:27:00 +0200 Subject: [PATCH 1/2] Handle special mac arm64 official installer case --- aqt/helper.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aqt/helper.py b/aqt/helper.py index 787b686..93801f3 100644 --- a/aqt/helper.py +++ b/aqt/helper.py @@ -135,6 +135,11 @@ def get_qt_installers() -> dict[str, str]: # Most likely for macOS which might just say "mac" without arch installers[os_type] = filename + # macOS arm64 special case, as no official arm64 installer exists + # it should not override the arm64 installer if it appears later + if installers["mac-x64"] and not installers["mac-arm64"]: + installers["mac-arm64"] = installers["mac-x64"] + return installers except requests.exceptions.RequestException as e: From 760691c535c05bb1c7bfbe6f4f7bdb170ad47056 Mon Sep 17 00:00:00 2001 From: Arnaud de Mouhy Date: Mon, 13 Oct 2025 16:54:47 +0200 Subject: [PATCH 2/2] Use dictionary's get --- aqt/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aqt/helper.py b/aqt/helper.py index 93801f3..60b26a3 100644 --- a/aqt/helper.py +++ b/aqt/helper.py @@ -137,7 +137,7 @@ def get_qt_installers() -> dict[str, str]: # macOS arm64 special case, as no official arm64 installer exists # it should not override the arm64 installer if it appears later - if installers["mac-x64"] and not installers["mac-arm64"]: + if installers.get("mac-x64") and not installers.get("mac-arm64"): installers["mac-arm64"] = installers["mac-x64"] return installers