Commit 89d81972 authored by Joshua Roesslein's avatar Joshua Roesslein
Browse files

Merge pull request #583 from kimtree/clean-up-code

Remove deprecated function and clean up codes
parents 2ceda616 b7b865f4
......@@ -123,7 +123,6 @@ class OAuthHandler(AuthHandler):
'x_auth_username': username,
'x_auth_password': password})
print(r.content)
credentials = parse_qs(r.content)
return credentials.get('oauth_token')[0], credentials.get('oauth_token_secret')[0]
except Exception as e:
......
......@@ -64,7 +64,7 @@ class JSONParser(Parser):
def parse_error(self, payload):
error = self.json_lib.loads(payload)
if error.has_key('error'):
if 'error' in error:
return error['error']
else:
return error['errors']
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment