bug fix
This commit is contained in:
@@ -150,13 +150,20 @@ def imports_do_refresh_token(refreshtoken,oauth_data,access_token=''):
|
|||||||
baseurl = oauth_data['base_url']
|
baseurl = oauth_data['base_url']
|
||||||
|
|
||||||
if 'json' in oauth_data['content_type']:
|
if 'json' in oauth_data['content_type']:
|
||||||
response = requests.post(baseurl,
|
try:
|
||||||
|
response = requests.post(baseurl,
|
||||||
data=json.dumps(post_data),
|
data=json.dumps(post_data),
|
||||||
headers=headers)
|
headers=headers)
|
||||||
|
except:
|
||||||
|
raise NoTokenError("Failed to get token")
|
||||||
else:
|
else:
|
||||||
response = requests.post(baseurl,
|
try:
|
||||||
data=post_data,
|
response = requests.post(baseurl,
|
||||||
headers=headers)
|
data=post_data,
|
||||||
|
headers=headers
|
||||||
|
)
|
||||||
|
except:
|
||||||
|
raise NoTokenError("Failed to get token")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user