]> code.ossystems Code Review - openembedded-core.git/commitdiff
class/sanity: strip the output of get_filesystem_id()
authorSteven Hung (洪于玉) <Steven.Hung@mediatek.com>
Wed, 13 Mar 2019 06:26:05 +0000 (06:26 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 18 Mar 2019 11:09:55 +0000 (11:09 +0000)
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 (洪于玉) <Steven.Hung@mediatek.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sanity.bbclass

index 374dacf4d0e442330a8a77c9c850a59ff8538eae..cab09214014c3ec8d0403aa80f65a14ff959b4a1 100644 (file)
@@ -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