diff --git a/tests/framework/properties.py b/tests/framework/properties.py index 036d3743b42..f7ae4b8b3ff 100644 --- a/tests/framework/properties.py +++ b/tests/framework/properties.py @@ -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]