We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8c5204a + e6f1b45 commit 1d002a7Copy full SHA for 1d002a7
adafruit_binascii.py
@@ -104,7 +104,7 @@ def hexlify(data):
104
if not data:
105
raise TypeError("Data provided is zero-length")
106
data = "".join("%02x" % i for i in data)
107
- return data.encode()
+ return bytes(data, 'utf-8')
108
109
B2A_HEX = hexlify
110
A2B_HEX = unhexlify
@@ -187,4 +187,4 @@ def b2a_base64(bin_data):
187
res.append(TABLE_B2A_B64[(leftchar & 0xf) << 2])
188
res.append("=")
189
res.append('\n')
190
- return ''.join(res).encode('ascii')
+ return bytes(''.join(res), 'ascii')
0 commit comments