try:
token = oauth.OAuthToken.from_string(response)
except Exception, e:
+ import traceback
+ traceback.print_exc()
+ print response
raise Exception("Authorization failure - failed to get request token")
return token
connection.request(oauth_request.http_method, self.ACCESS_TOKEN_URL, headers=oauth_request.to_header())
response = connection.getresponse()
token_str = response.read()
- if "ouath_problem" in token_str:
- raise Exception("Authorization failure - failed to get access token")
+ if 'oauth_problem' in token_str:
+ raise Exception("Authorization failure - failed to get access token (" + token_str + ")")
self._store_access_token_in_gconf(token_str)
return oauth.OAuthToken.from_string(token_str)
except Exception, e:
import traceback
traceback.print_exc()
- raise Exception("LinkedIn authorization failed, try again (" + e + ")")
+ raise Exception("LinkedIn authorization failed, try again")
# -----------------------------------------------------------------------