diff options
author | Steven Hung (洪于玉) <Steven.Hung@mediatek.com> | 2019-03-13 06:26:05 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-03-18 11:12:26 +0000 |
commit | 49ffd2da219007c8f1a1c51da1a35c18268eb363 (patch) | |
tree | ef5809af41f3c23e97039a6a61fb8d79d4454195 /meta | |
parent | 2f26e0e8d558ad47ffb0cf34be0f06a5c8272bbd (diff) | |
download | poky-49ffd2da219007c8f1a1c51da1a35c18268eb363.tar.gz |
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>
Diffstat (limited to 'meta')
-rw-r--r-- | 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 374dacf4d0..cab0921401 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -338,7 +338,7 @@ def check_path_length(filepath, pathname, limit): | |||
338 | def get_filesystem_id(path): | 338 | def get_filesystem_id(path): |
339 | import subprocess | 339 | import subprocess |
340 | try: | 340 | try: |
341 | return subprocess.check_output(["stat", "-f", "-c", "%t", path]).decode('utf-8') | 341 | return subprocess.check_output(["stat", "-f", "-c", "%t", path]).decode('utf-8').strip() |
342 | except subprocess.CalledProcessError: | 342 | except subprocess.CalledProcessError: |
343 | bb.warn("Can't get filesystem id of: %s" % path) | 343 | bb.warn("Can't get filesystem id of: %s" % path) |
344 | return None | 344 | return None |