profile loading/creation update, bug fixes
This commit is contained in:
parent
a4da3a7afa
commit
a714c1045d
5 changed files with 10 additions and 11 deletions
|
|
@ -22,8 +22,8 @@ def tox_dns(email):
|
|||
def send_request(url, data):
|
||||
req = urllib.request.Request(url)
|
||||
req.add_header('Content-Type', 'application/json')
|
||||
response = urllib.request.urlopen(req, json.dumps(data))
|
||||
res = json.loads(response.read())
|
||||
response = urllib.request.urlopen(req, bytes(json.dumps(data), 'utf-8'))
|
||||
res = json.loads(str(response.read(), 'utf-8'))
|
||||
if not res['c']:
|
||||
return res['tox_id']
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue