Update api.py

hexlify -> unhexlify. We're decoding, not encoding.
This commit is contained in:
Scott King 2017-05-29 15:22:17 -06:00 committed by GitHub
parent ea4361ad78
commit 977921c6dd

View File

@ -141,7 +141,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
def _decode(self, text, decode_type): def _decode(self, text, decode_type):
try: try:
if decode_type == 'hex': if decode_type == 'hex':
return hexlify(text) return unhexlify(text)
elif decode_type == 'base64': elif decode_type == 'base64':
return base64.b64decode(text) return base64.b64decode(text)
except Exception as e: except Exception as e: