pytest-testinfra
pytest-testinfra copied to clipboard
_get_linux_sysinfo() will raise KeyError if lsb_release -a returns with rc != 0
affected version: 7.0.0
# Arch doesn't have releases
> if sysinfo["distribution"] == "arch":
E KeyError: 'distribution'
venv/lib/python3.8/site-packages/testinfra/modules/systeminfo.py:82: KeyError
This line 82 should be changed to:
if "distribution" in sysinfo and sysinfo["distribution"] == "arch":
I will open a PR for that.