From 172c3e85c601a61f3c668f83b75f4c1eb31dbd4d Mon Sep 17 00:00:00 2001 From: "Steven Hung (洪于玉)" Date: Wed, 13 Mar 2019 06:26:05 +0000 Subject: class/sanity: strip the output of get_filesystem_id() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A previous commit 2f44b9b replace oe.utils.getstatusoutput() to subprocess.check_output(). check_output() don't remove a trailling newline. Add strip() Signed-off-by: Steven Hung (洪于玉) Signed-off-by: Richard Purdie --- meta/classes/sanity.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta') diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 374dacf4d0..cab0921401 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass @@ -338,7 +338,7 @@ def check_path_length(filepath, pathname, limit): def get_filesystem_id(path): import subprocess try: - return subprocess.check_output(["stat", "-f", "-c", "%t", path]).decode('utf-8') + return subprocess.check_output(["stat", "-f", "-c", "%t", path]).decode('utf-8').strip() except subprocess.CalledProcessError: bb.warn("Can't get filesystem id of: %s" % path) return None -- cgit 1.2.3-korg