summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-04-18 09:56:09 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-18 10:57:30 (GMT)
commitf4eed2b8b87f8b705c3f3a55665a2069dced31cf (patch)
treed2673e24ac6f920cb5e3b420fa2268eaef55bb60 /meta/classes
parentd73e41f4375f8f6056f01f1475aca20545c02ad4 (diff)
downloadpoky-f4eed2b8b87f8b705c3f3a55665a2069dced31cf.tar.gz
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>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sanity.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 4d4abd3..3ec449c 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -120,7 +120,7 @@ def check_supported_distro(e):
120 if os.path.exists("/etc/redhat-release"): 120 if os.path.exists("/etc/redhat-release"):
121 f = open("/etc/redhat-release", "r") 121 f = open("/etc/redhat-release", "r")
122 try: 122 try:
123 distro = f.readline() 123 distro = f.readline().strip()
124 finally: 124 finally:
125 f.close() 125 f.close()
126 elif os.path.exists("/etc/SuSE-release"): 126 elif os.path.exists("/etc/SuSE-release"):