From bea0311a6478febe8ab4884fb1c479f610856534 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Wed, 18 Apr 2012 10:56:09 +0100 Subject: 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. Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- meta/classes/sanity.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta/classes/sanity.bbclass') diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 4d4abd3ea5..3ec449c746 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass @@ -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"): -- cgit v1.2.3