Skip to content

Commit

Permalink
Fixed auth loop (#1025) (#1367)
Browse files Browse the repository at this point in the history
* Fixed auth loop (#1025)

* Forgot to change one line to elif
  • Loading branch information
dsf3449 authored and 6iz committed Jul 23, 2016
1 parent a5cba1a commit c24590e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pogom/pgoapi/pgoapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,17 @@ def login(self, provider, username, password):
if 'api_url' in response:
self._api_endpoint = ('https://{}/rpc'.format(response['api_url']))
self.log.debug('Setting API endpoint to: %s', self._api_endpoint)
else:
self.log.error('Login failed - unexpected server response!')
return False

if 'auth_ticket' in response:
elif 'auth_ticket' in response:
auth_ticket = response['auth_ticket']
self._auth_provider.set_ticket([auth_ticket['expire_timestamp_ms'], auth_ticket['start'], auth_ticket['end']])

else:
self.log.error('Login failed - unexpected server response!')
return False

self.log.info('Finished RPC login sequence (app simulation)')
self.log.info('Login process completed')

return True


0 comments on commit c24590e

Please sign in to comment.