Skip to content

Commit

Permalink
test/imgtestlib: remove use of match statement
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
achilleas-k committed Apr 11, 2024
1 parent 56eebc3 commit ea6e95a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/scripts/imgtestlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit ea6e95a

Please sign in to comment.