Skip to content

Commit e7d89ee

Browse files
ondrnophilpep
authored andcommitted
check if key "distribution" exists
1 parent 5018486 commit e7d89ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testinfra/modules/systeminfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def _get_linux_sysinfo(self):
7979
line[len(key) :].replace('"', "").replace("'", "").strip()
8080
)
8181
# Arch doesn't have releases
82-
if sysinfo["distribution"] == "arch":
82+
if "distribution" in sysinfo and sysinfo["distribution"] == "arch":
8383
sysinfo["release"] = "rolling"
8484
return sysinfo
8585

0 commit comments

Comments
 (0)