Stefan Reinauer has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/42320 )
Change subject: util/mtkheader: Port gen-bl-img.py to python3 ......................................................................
util/mtkheader: Port gen-bl-img.py to python3
converted with 2to3 and manually changed shebang to reflect python3. Tested by calling the script on the command line.
Change-Id: Ia7b46093f1dcecd03d16fbe5f37d1aae7679bac3 Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org --- M util/mtkheader/gen-bl-img.py 1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/42320/1
diff --git a/util/mtkheader/gen-bl-img.py b/util/mtkheader/gen-bl-img.py index 282dfbf..e1672fa 100755 --- a/util/mtkheader/gen-bl-img.py +++ b/util/mtkheader/gen-bl-img.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # # SPDX-License-Identifier: GPL-2.0-only
@@ -77,9 +77,9 @@
def main(argv): if len(argv) != 5: - print 'Usage: %s <chip> <flash_type> <input_file> <output_file>' % argv[0] - print '\t flash_type: emmc|sf' - print '\t chip : mt8173|mt8183' + print('Usage: %s <chip> <flash_type> <input_file> <output_file>' % argv[0]) + print('\t flash_type: emmc|sf') + print('\t chip : mt8173|mt8183')
exit(1) write(argv[4], gen_preloader(argv[1], argv[2], read(argv[3])))
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42320 )
Change subject: util/mtkheader: Port gen-bl-img.py to python3 ......................................................................
Patch Set 1: Code-Review+2
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42320 )
Change subject: util/mtkheader: Port gen-bl-img.py to python3 ......................................................................
Patch Set 2: Code-Review+2
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42320 )
Change subject: util/mtkheader: Port gen-bl-img.py to python3 ......................................................................
Patch Set 2: Code-Review+2
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42320 )
Change subject: util/mtkheader: Port gen-bl-img.py to python3 ......................................................................
Patch Set 3:
(1 comment)
Ok, only `print()` is needed.
https://review.coreboot.org/c/coreboot/+/42320/3/util/mtkheader/gen-bl-img.p... File util/mtkheader/gen-bl-img.py:
https://review.coreboot.org/c/coreboot/+/42320/3/util/mtkheader/gen-bl-img.p... PS3, Line 1: #!/usr/bin/env python3 Can it stay with `python`, as `print()` is supported by Python 2 too?
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42320 )
Change subject: util/mtkheader: Port gen-bl-img.py to python3 ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42320/3/util/mtkheader/gen-bl-img.p... File util/mtkheader/gen-bl-img.py:
https://review.coreboot.org/c/coreboot/+/42320/3/util/mtkheader/gen-bl-img.p... PS3, Line 1: #!/usr/bin/env python3
Can it stay with `python`, as `print()` is supported by Python 2 too?
you will need to add
from __future__ import print_function
But yes, that may be a good plan.
Idwer Vollering has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42320 )
Change subject: util/mtkheader: Port gen-bl-img.py to python3 ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42320/3/util/mtkheader/gen-bl-img.p... File util/mtkheader/gen-bl-img.py:
https://review.coreboot.org/c/coreboot/+/42320/3/util/mtkheader/gen-bl-img.p... PS3, Line 80: output_file While you're updating this code to python3, may I suggest using string literals instead? print(f"Usage: {argv[0]} ...")
https://docs.python.org/3/reference/lexical_analysis.html#formatted-string-l...
Idwer Vollering has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42320 )
Change subject: util/mtkheader: Port gen-bl-img.py to python3 ......................................................................
Patch Set 3:
ping
Stefan Reinauer has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/42320 )
Change subject: util/mtkheader: Port gen-bl-img.py to python3 ......................................................................
Abandoned