unpackOnionAddress Py3 support

This commit is contained in:
shortcutme 2019-03-15 23:55:40 +01:00
parent d4d86172f0
commit a42dee5a44
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -111,7 +111,7 @@ def packOnionAddress(onion, port):
# From 12byte format to ip, port
def unpackOnionAddress(packed):
return base64.b32encode(packed[0:-2]).lower() + ".onion", struct.unpack("H", packed[-2:])[0]
return base64.b32encode(packed[0:-2]).lower().decode() + ".onion", struct.unpack("H", packed[-2:])[0]
# Get dir from file