1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 05:09:24 +00:00

classes/sanity: trim trailing newline when reading /etc/redhat-release

Any trailing whitespace needs to be stripped before comparing it to the
SANITY_TESTED_DISTROS list.

(From OE-Core rev: bea0311a6478febe8ab4884fb1c479f610856534)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton
2012-04-18 10:56:09 +01:00
committed by Richard Purdie
parent d73e41f437
commit f4eed2b8b8
+1 -1
View File
@@ -120,7 +120,7 @@ def check_supported_distro(e):
if os.path.exists("/etc/redhat-release"):
f = open("/etc/redhat-release", "r")
try:
distro = f.readline()
distro = f.readline().strip()
finally:
f.close()
elif os.path.exists("/etc/SuSE-release"):