[OE-core] [PATCH 1/2] classes/sanity: trim trailing newline when reading /etc/redhat-release
Paul Eggleton
paul.eggleton at linux.intel.com
Wed Apr 18 09:56:09 UTC 2012
Any trailing whitespace needs to be stripped before comparing it to the
SANITY_TESTED_DISTROS list.
Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
---
meta/classes/sanity.bbclass | 2 +-
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):
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"):
--
1.7.5.4
More information about the Openembedded-core
mailing list