diff options
author | jan <jan.vermaete@gmail.com> | 2020-03-12 21:44:44 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-03-13 11:32:10 +0000 |
commit | 7e9fdd755d2234a3894f15704a6172bab4f5d0d4 (patch) | |
tree | 28776410959109a7a337eb0221f969c09e78d01d /scripts/tiny | |
parent | ca5b3b4d1cdeaf4ad58c84300a2e395d3c52bb51 (diff) | |
download | poky-7e9fdd755d2234a3894f15704a6172bab4f5d0d4.tar.gz |
scritpts/tiny/ksize: Cleanup some python2 leftover in ksize.py
Although the script was running with Python3, almost no detailed
output was generated.
(From OE-Core rev: bd17a7e60264bb40df340fa38c425a7d7372516e)
Signed-off-by: Jan Vermaete <jan.vermaete@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/tiny')
-rwxr-xr-x | scripts/tiny/ksize.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/tiny/ksize.py b/scripts/tiny/ksize.py index bc11919f4b..8316b85cb1 100755 --- a/scripts/tiny/ksize.py +++ b/scripts/tiny/ksize.py | |||
@@ -27,7 +27,7 @@ def usage(): | |||
27 | class Sizes: | 27 | class Sizes: |
28 | def __init__(self, glob): | 28 | def __init__(self, glob): |
29 | self.title = glob | 29 | self.title = glob |
30 | p = Popen("size -t " + str(glob), shell=True, stdout=PIPE, stderr=PIPE) | 30 | p = Popen("size -t " + str(glob), shell=True, stdout=PIPE, stderr=PIPE, universal_newlines=True) |
31 | output = p.communicate()[0].splitlines() | 31 | output = p.communicate()[0].splitlines() |
32 | if len(output) > 2: | 32 | if len(output) > 2: |
33 | sizes = output[-1].split()[0:4] | 33 | sizes = output[-1].split()[0:4] |
@@ -49,14 +49,14 @@ class Report: | |||
49 | path = os.path.dirname(filename) | 49 | path = os.path.dirname(filename) |
50 | 50 | ||
51 | p = Popen("ls " + str(path) + "/*.o | grep -v built-in.o", | 51 | p = Popen("ls " + str(path) + "/*.o | grep -v built-in.o", |
52 | shell=True, stdout=PIPE, stderr=PIPE) | 52 | shell=True, stdout=PIPE, stderr=PIPE, universal_newlines=True) |
53 | glob = ' '.join(p.communicate()[0].splitlines()) | 53 | glob = ' '.join(p.communicate()[0].splitlines()) |
54 | oreport = Report(glob, str(path) + "/*.o") | 54 | oreport = Report(glob, str(path) + "/*.o") |
55 | oreport.sizes.title = str(path) + "/*.o" | 55 | oreport.sizes.title = str(path) + "/*.o" |
56 | r.parts.append(oreport) | 56 | r.parts.append(oreport) |
57 | 57 | ||
58 | if subglob: | 58 | if subglob: |
59 | p = Popen("ls " + subglob, shell=True, stdout=PIPE, stderr=PIPE) | 59 | p = Popen("ls " + subglob, shell=True, stdout=PIPE, stderr=PIPE, universal_newlines=True) |
60 | for f in p.communicate()[0].splitlines(): | 60 | for f in p.communicate()[0].splitlines(): |
61 | path = os.path.dirname(f) | 61 | path = os.path.dirname(f) |
62 | r.parts.append(Report.create(f, path, str(path) + "/*/built-in.o")) | 62 | r.parts.append(Report.create(f, path, str(path) + "/*/built-in.o")) |