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:
parent
d73e41f437
commit
f4eed2b8b8
|
@ -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"):
|
||||
|
|
Loading…
Reference in New Issue