WIP: Quick and dirty python3 port

This commit is contained in:
Hector Martin
2021-03-17 23:53:31 +09:00
parent a8e5f6c0f7
commit cad274a7fb
41 changed files with 2399 additions and 2387 deletions

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
import sys, os, os.path
import pywii
@@ -17,7 +17,7 @@ if sys.argv[1] == "-cetk":
elif sys.argv[1] == "-tmd":
signed = pywii.WiiTmd(open(infile, "rb").read())
else:
print "EYOUFAILIT"
print("EYOUFAILIT")
sys.exit(1)
certs, certlist = pywii.parse_certs(open(certfile).read())
@@ -25,11 +25,11 @@ certs, certlist = pywii.parse_certs(open(certfile).read())
signed.update_issuer(issuer)
if not signed.sign(certs):
print "dpki signing failed"
print("dpki signing failed")
sys.exit(1)
open(outfile, "wb").write(signed.data)
print "successfully signed %s" % outfile
print("successfully signed %s" % outfile)
sys.exit(0)