bug fix
This commit is contained in:
parent
42b78da7e3
commit
3d63b6f9f6
4
app.py
4
app.py
|
@ -321,7 +321,7 @@ def oauth_api_request(params):
|
||||||
client_secret=client_secret,
|
client_secret=client_secret,
|
||||||
resource_owner_key=session['owner_key'],
|
resource_owner_key=session['owner_key'],
|
||||||
resource_owner_secret=session['owner_secret'])
|
resource_owner_secret=session['owner_secret'])
|
||||||
r = oauth.get(url)
|
r = oauth.get(url, timeout=2)
|
||||||
reply = r.json()
|
reply = r.json()
|
||||||
|
|
||||||
return reply
|
return reply
|
||||||
|
@ -349,7 +349,7 @@ def get_token():
|
||||||
'format': 'json',
|
'format': 'json',
|
||||||
'formatversion': 2,
|
'formatversion': 2,
|
||||||
}
|
}
|
||||||
reply = oauth_api_request(params, timeout=2)
|
reply = oauth_api_request(params)
|
||||||
token = reply['query']['tokens']['csrftoken']
|
token = reply['query']['tokens']['csrftoken']
|
||||||
|
|
||||||
return token
|
return token
|
||||||
|
|
Loading…
Reference in a new issue