Skip to content

Commit

Permalink
Make signing.py Python2.6+ and Python3+ compat (esp8266#5807)
Browse files Browse the repository at this point in the history
Make the signing header generation work under Python2.6+ and Python 3+.
  • Loading branch information
Androbin authored and earlephilhower committed Feb 25, 2019
1 parent 167f39d commit ca2f31a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ def main():
val += "#include <pgmspace.h>\n"
val += "#define ARDUINO_SIGNING 1\n"
val += "static const char signing_pubkey[] PROGMEM = {\n"
for i in pub:
val += "0x%02x, \n" % ord(i)
for i in bytearray(pub):
val += "0x%02x, \n" % i
val = val[:-3]
val +="\n};\n"
sys.stderr.write("Enabling binary signing\n")
except:
except IOError:
# Silence the default case to avoid people thinking something is wrong.
# Only people who care about signing will know what it means, anyway,
# and they can check for the positive acknowledgement above.
Expand Down

0 comments on commit ca2f31a

Please sign in to comment.