Commit b4fa5e38 by Owo Sugiana

Bug fixed get_header() saat Py3

1 parent 451ae504
......@@ -6,4 +6,5 @@ def get_random_number(width=12):
def get_jsonrpc(method, params):
return dict(jsonrpc='2.0', method=method, params=params, id=get_random_number(6))
n = get_random_number(6)
return dict(jsonrpc='2.0', method=method, params=params, id=n)
......@@ -33,7 +33,7 @@ def get_header(userid, password, time_stamp):
else:
s = base64.encodebytes(signature)
if isinstance(s, bytes):
s = str(s)
s = s.decode()
s = s.replace('\n', '')
return dict(userid=userid, signature=s, key=time_stamp)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!