Skip to content

Commit

Permalink
Merge pull request #583 from kimtree/clean-up-code
Browse files Browse the repository at this point in the history
Remove deprecated function and clean up codes
  • Loading branch information
joshthecoder committed Nov 5, 2015
2 parents 2ceda61 + b7b865f commit 89d8197
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion tweepy/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ def get_xauth_access_token(self, username, password):
'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:
Expand Down
2 changes: 1 addition & 1 deletion tweepy/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def parse(self, method, payload):

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']
Expand Down

0 comments on commit 89d8197

Please sign in to comment.