Skip to content

Commit

Permalink
Account may not be selected yet in exception. (#2462)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienvercammen committed Jan 25, 2018
1 parent 1da4a34 commit e866af0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pogom/models.py
Expand Up @@ -2406,10 +2406,13 @@ def encounter_pokemon(args, pokemon, account, api, account_sets, status,
result = pokemon_info

except Exception as e:
log.exception('There was an error encountering Pokemon ID %s with ' +
'account %s: %s.',
# Account may not be selected yet.
if hlvl_account:
log.warning('Exception occured during encounter with'
' high-level account %s.',
hlvl_account['username'])
log.exception('There was an error encountering Pokemon ID %s: %s.',
pokemon_id,
hlvl_account['username'],
e)

# We're done with the encounter. If it's from an
Expand Down

0 comments on commit e866af0

Please sign in to comment.