Skip to content

Commit

Permalink
Fixed error handling issue in login_ptc and enhanced debug error output
Browse files Browse the repository at this point in the history
  • Loading branch information
tejado committed Jul 14, 2016
1 parent eccdd56 commit 670d396
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,10 @@ def login_ptc(username, password):
ticket = None
try:
ticket = re.sub('.*ticket=', '', r1.history[0].headers['Location'])
except:
return False
except Exception,e:
if DEBUG:
print(r1.json()['errors'][0])
return None

data1 = {
'client_id': 'mobile-app_pokemon-go',
Expand Down

0 comments on commit 670d396

Please sign in to comment.