Skip to content

Commit

Permalink
check if key "distribution" exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrno authored and philpep committed May 19, 2023
1 parent 5018486 commit e7d89ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testinfra/modules/systeminfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e7d89ee

Please sign in to comment.