From 310fbdb3aa6649ebc87dec6c33b809d83cb9ea7d Mon Sep 17 00:00:00 2001 From: bvpav Date: Sun, 2 Apr 2023 18:21:30 +0300 Subject: [PATCH] Fix: Crash in `install_linux_packages.py` script This fixes a KeyError exception when running `install_linux_packages.py` with `--distro-id`. The exception was thrown, because of a bare return in `get_distro`, which caused a dict to be indexed with `None`. --- build_files/build_environment/install_linux_packages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_files/build_environment/install_linux_packages.py b/build_files/build_environment/install_linux_packages.py index a53b60cc2d8..09fc6651471 100755 --- a/build_files/build_environment/install_linux_packages.py +++ b/build_files/build_environment/install_linux_packages.py @@ -1550,7 +1550,7 @@ DISTRO_IDS_INSTALLERS = { def get_distro(settings): if settings.distro_id is not ...: settings.logger.info(f"Distribution identifier forced by user to {settings.distro_id}.") - return + return settings.distro_id import platform info = platform.freedesktop_os_release() ids = [info["ID"]] -- 2.30.2