first commit
This commit is contained in:
parent
3936f652e9
commit
dd53c6a842
21 changed files with 116 additions and 114 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import json
|
||||
import urllib2
|
||||
import urllib.request
|
||||
from util import log
|
||||
|
||||
|
||||
|
|
@ -20,9 +20,9 @@ def tox_dns(email):
|
|||
|
||||
|
||||
def send_request(url, data):
|
||||
req = urllib2.Request(url)
|
||||
req = urllib.request.Request(url)
|
||||
req.add_header('Content-Type', 'application/json')
|
||||
response = urllib2.urlopen(req, json.dumps(data))
|
||||
response = urllib.request.urlopen(req, json.dumps(data))
|
||||
res = json.loads(response.read())
|
||||
if not res['c']:
|
||||
return res['tox_id']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue