diff --git a/testinfra/modules/systeminfo.py b/testinfra/modules/systeminfo.py index ba250359..907ea279 100644 --- a/testinfra/modules/systeminfo.py +++ b/testinfra/modules/systeminfo.py @@ -79,7 +79,7 @@ def _get_linux_sysinfo(self): line[len(key) :].replace('"', "").replace("'", "").strip() ) # Arch doesn't have releases - if sysinfo["distribution"] == "arch": + if "distribution" in sysinfo and sysinfo["distribution"] == "arch": sysinfo["release"] = "rolling" return sysinfo