From: Serge Hallyn Date: Thu, 22 May 2025 11:27:11 +0000 (-0500) Subject: Revert "tests/: improve distribution detection" X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6ff1fc21d5695bcc5f271bfeaca0b511a0ddd88e;p=thirdparty%2Fshadow.git Revert "tests/: improve distribution detection" This reverts commit 091c91fb11e04dd710eb81130690c9486d169204. --- diff --git a/tests/system/framework/hosts/base.py b/tests/system/framework/hosts/base.py index 764c15aff..a5ee5d914 100644 --- a/tests/system/framework/hosts/base.py +++ b/tests/system/framework/hosts/base.py @@ -54,8 +54,7 @@ class BaseLinuxHost(MultihostHost[ShadowMultihostDomain]): """ self.logger.info(f"Detecting distro information on {self.hostname}") os_release = self.fs.read("/etc/os-release") - valid_lines = [line for line in os_release.splitlines() if line and not line.startswith("#")] - self._os_release = dict(csv.reader(valid_lines, delimiter="=")) + self._os_release = dict(csv.reader([x for x in os_release.splitlines() if x], delimiter="=")) if "NAME" in self._os_release: self._distro_name = self._os_release["NAME"] if "VERSION_ID" not in self._os_release: