mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 03:32:12 +02:00
class/sanity: strip the output of get_filesystem_id()
A previous commit 2f44b9b replace oe.utils.getstatusoutput() to subprocess.check_output(). check_output() don't remove a trailling newline. Add strip() (From OE-Core rev: 172c3e85c601a61f3c668f83b75f4c1eb31dbd4d) Signed-off-by: Steven Hung (洪于玉) <Steven.Hung@mediatek.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
2f26e0e8d5
commit
49ffd2da21
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user