diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-05-30 18:14:46 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-01 12:47:10 +0100 |
commit | 2e388048b61f6029bae1913cbb546ac40b9cfe51 (patch) | |
tree | 8fa0fc951caab1430636fca971c27a7e7beb45ce /scripts/tiny/dirsize.py | |
parent | 79be110c1fdfd0affe6a310b96e7107c4549d23c (diff) | |
download | poky-2e388048b61f6029bae1913cbb546ac40b9cfe51.tar.gz |
scripts: python3: Use print function
Used print function instead of print statement to make
the code work in python 3.
(From OE-Core rev: 80fecc44761fa38ccf2e4dc6897b9f1f0c9c1ed0)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/tiny/dirsize.py')
-rwxr-xr-x | scripts/tiny/dirsize.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/tiny/dirsize.py b/scripts/tiny/dirsize.py index 40ff4ab895..5329b86f75 100755 --- a/scripts/tiny/dirsize.py +++ b/scripts/tiny/dirsize.py | |||
@@ -71,7 +71,7 @@ class Record: | |||
71 | total = 0 | 71 | total = 0 |
72 | if self.size <= minsize: | 72 | if self.size <= minsize: |
73 | return 0 | 73 | return 0 |
74 | print "%10d %s" % (self.size, self.path) | 74 | print("%10d %s" % (self.size, self.path)) |
75 | for r in self.records: | 75 | for r in self.records: |
76 | total += r.show(minsize) | 76 | total += r.show(minsize) |
77 | if len(self.records) == 0: | 77 | if len(self.records) == 0: |
@@ -85,8 +85,8 @@ def main(): | |||
85 | minsize = int(sys.argv[1]) | 85 | minsize = int(sys.argv[1]) |
86 | rootfs = Record.create(".") | 86 | rootfs = Record.create(".") |
87 | total = rootfs.show(minsize) | 87 | total = rootfs.show(minsize) |
88 | print "Displayed %d/%d bytes (%.2f%%)" % \ | 88 | print("Displayed %d/%d bytes (%.2f%%)" % \ |
89 | (total, rootfs.size, 100 * float(total) / rootfs.size) | 89 | (total, rootfs.size, 100 * float(total) / rootfs.size)) |
90 | 90 | ||
91 | 91 | ||
92 | if __name__ == "__main__": | 92 | if __name__ == "__main__": |