Skip to content

gen_appbin.py fails with Python 3 #375

@onitake

Description

@onitake

When running tools/gen_appbin.py with Python 3, I get various errors:

  File "tools/gen_appbin.py", line 55
    print 'file_name cannot be none\n'
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

  File "tools/gen_appbin.py", line 81
    if need_chk:
TabError: inconsistent use of tabs and spaces in indentation

Python 2 is out of support since 2020, and the last remains are being removed from Linux distributions.
Please ensure these scripts are compatible with Python 3.

It shouldn't be too hard to convert them, here's a trivial patch for gen_appbin.py (may need some testing): https://gist.github.com/onitake/045a55ad2aabf42b193474483cbcd234
I can make a pull request if you like.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions