summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]onlineupdate/source/update/updater/gen_cert_header.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/onlineupdate/source/update/updater/gen_cert_header.py b/onlineupdate/source/update/updater/gen_cert_header.py
index 182e98b64443..5fff9be79084 100644..100755
--- a/onlineupdate/source/update/updater/gen_cert_header.py
+++ b/onlineupdate/source/update/updater/gen_cert_header.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
import sys
import binascii
@@ -13,13 +15,13 @@ def file_byte_generator(filename, block_size = 512):
def create_header(array_name, in_filename):
hexified = ["0x" + binascii.hexlify(byte) for byte in file_byte_generator(in_filename)]
- print "const uint8_t " + array_name + "[] = {"
- print ", ".join(hexified)
- print "};"
+ print("const uint8_t " + array_name + "[] = {")
+ print(", ".join(hexified))
+ print("};")
return 0
if __name__ == '__main__':
if len(sys.argv) < 3:
- print 'ERROR: usage: gen_cert_header.py array_name in_filename'
+ print('ERROR: usage: gen_cert_header.py array_name in_filename')
sys.exit(1);
sys.exit(create_header(sys.argv[1], sys.argv[2]))