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 changed files with 1 additions and 1 deletions

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"):