]> code.ossystems Code Review - openembedded-core.git/commitdiff
classes/sanity: trim trailing newline when reading /etc/redhat-release
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 18 Apr 2012 09:56:09 +0000 (10:56 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 18 Apr 2012 10:56:39 +0000 (11:56 +0100)
Any trailing whitespace needs to be stripped before comparing it to the
SANITY_TESTED_DISTROS list.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sanity.bbclass

index 4d4abd3ea57803f00a318e4c92a14b771a6ad5e4..3ec449c7461c69d7d716363bdaadae0c733925ef 100644 (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"):