Nitrokey / nitrokey-start-firmware

A mirror of Gnuk's 1.0.x and 1.2.x branches.
56 stars 15 forks source link

tool/upgrade_by_passwd.py does not work with python3 #16

Closed lanodan closed 4 years ago

lanodan commented 5 years ago
…/nitrokey-start-firmware/tool $ python3.6 ./upgrade_by_passwd.py ../prebuilt/$RTM/regnual.bin ../prebuilt/$RTM/gnuk.bin
  File "./upgrade_by_passwd.py", line 40
    print "CRC32: %04x\n" % crc32code
                        ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("CRC32: %04x\n" % crc32code)?

Python 2 will be EOL in 2020-01-01 please move to Python 3.

szszszsz commented 4 years ago

Fixed for upgrade_by_passwd.py with https://github.com/Nitrokey/nitrokey-start-firmware/commit/57363dd211ff12fd1be19387f01bf653d7549e99. The error came from using the old branch, which was default for some time. Other tools are rewritten in the latest upstream. This ticket will be closed once changes will be merged (planned on the next release).