From 6c7dc002a1c7f7e68828cf2fea2ec3714e2e2eb6 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Thu, 11 Apr 2024 15:21:30 +0200 Subject: [PATCH] test/imgtestlib: remove use of match statement We run setup-osbuild-repo on CentOS Stream 8 now which imports the library but doesn't have a new enough python version to include the 'match' statement. --- test/scripts/imgtestlib.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/scripts/imgtestlib.py b/test/scripts/imgtestlib.py index 0df01847b2..9ad6545347 100644 --- a/test/scripts/imgtestlib.py +++ b/test/scripts/imgtestlib.py @@ -432,12 +432,10 @@ def rng_seed_env(): def host_container_arch(): host_arch = os.uname().machine - match host_arch: - case "x86_64": - return "amd64" - case "aarch64": - return "arm64" - return host_arch + return { + "x86_64": "amd64", + "aarch64": "arm64" + }.get(host_arch, host_arch) def is_manifest_list(data):