Stefan Reinauer has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/42330 )
Change subject: util/cavium: port devicetree_convert.py to python3 ......................................................................
util/cavium: port devicetree_convert.py to python3
converted with 2to3 and manually changed shebang to reflect python3. Tested by calling the script on the command line.
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org
Change-Id: Iecc29729d01c0096f8b3fc62acb9f306c8fb2958 --- M util/cavium/devicetree_convert.py 1 file changed, 5 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/30/42330/1
diff --git a/util/cavium/devicetree_convert.py b/util/cavium/devicetree_convert.py index 05f85aa..e4eb33b5 100755 --- a/util/cavium/devicetree_convert.py +++ b/util/cavium/devicetree_convert.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # SPDX-License-Identifier: GPL-3.0-or-later # devicetree_convert Tool to convert a DTB to a static C file
@@ -27,15 +27,15 @@ path = path.replace("/", "") if len(node) == 1: for i in node: - if type(i) is not unicode: - print "%s: Type is not string" % path + if not isinstance(i, str): + print("%s: Type is not string" % path) continue if args.verbose: - print "%s = %s" % (path, i) + print("%s = %s" % (path, i)) if outfile is not None: outfile.write("{"%s", "%s"},\n" % (path, i)) else: - print "%s: Arrays aren't supported" % path + print("%s: Arrays aren't supported" % path)
if outfile is not None: outfile.write("{0, 0},\n")
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42330 )
Change subject: util/cavium: port devicetree_convert.py to python3 ......................................................................
Patch Set 2: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/42330/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/42330/2//COMMIT_MSG@13 PS2, Line 13: Please Remove the blank line.
Idwer Vollering has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42330 )
Change subject: util/cavium: port devicetree_convert.py to python3 ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42330/2/util/cavium/devicetree_conv... File util/cavium/devicetree_convert.py:
https://review.coreboot.org/c/coreboot/+/42330/2/util/cavium/devicetree_conv... PS2, Line 31: print("%s: Type is not string" % path) This could be updated to use string literals, instead of pretending Python's print() is printf(). An explanation about string literals is in https://review.coreboot.org/c/coreboot/+/42330
Idwer Vollering has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42330 )
Change subject: util/cavium: port devicetree_convert.py to python3 ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42330/2/util/cavium/devicetree_conv... File util/cavium/devicetree_convert.py:
https://review.coreboot.org/c/coreboot/+/42330/2/util/cavium/devicetree_conv... PS2, Line 31: print("%s: Type is not string" % path)
This could be updated to use string literals, instead of pretending Python's print() is printf(). An explanation about string literals is in https://review.coreboot.org/c/coreboot/+/42330
Sorry, this should have been https://review.coreboot.org/c/coreboot/+/42320
Idwer Vollering has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42330 )
Change subject: util/cavium: port devicetree_convert.py to python3 ......................................................................
Patch Set 2:
ping
Stefan Reinauer has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/42330 )
Change subject: util/cavium: port devicetree_convert.py to python3 ......................................................................
Abandoned