Skip to content

Commit

Permalink
test: fix if the kernel does not meet our assumption
Browse files Browse the repository at this point in the history
In get_host_os, if there are not enough components, return None.

Signed-off-by: Pablo Barbáchano <[email protected]>
  • Loading branch information
pb8o committed Oct 19, 2023
1 parent d9541a1 commit eb292e3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/framework/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ def get_host_os(kv: str = None):
if kv is None:
kv = platform.release()
parts = kv.split("-")
if len(parts) < 2:
return None
misc = parts[1].split(".")
if len(misc) > 2 and misc[2] in {"amzn2", "amzn2023"}:
return misc[2]
Expand Down

0 comments on commit eb292e3

Please sign in to comment.