Skip to content

Commit

Permalink
Removing logging wrapping cleaning up the pokemon bag (#1172)
Browse files Browse the repository at this point in the history
  • Loading branch information
elicwhite authored Jul 27, 2016
1 parent 7024c14 commit 18f232b
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions pokemongo_bot/cell_workers/initial_transfer_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ def work(self):

pokemon_groups = self._initial_transfer_get_groups()


has_transferred = False

for id in pokemon_groups:

group_cp = pokemon_groups[id].keys()
Expand All @@ -32,20 +29,13 @@ def work(self):
pokemon_data = pokemon_groups[id][pokemon_cp]
pokemon_potential = self.get_pokemon_potential(pokemon_data)
if self.should_release_pokemon(pokemon_name, pokemon_cp, pokemon_potential):
if not has_transferred:
logger.log('Cleaning up Pokemon Bag using the release config', 'cyan')
has_transferred = True

logger.log('Exchanging {} [CP {}] [Potential {}]'.format(
pokemon_name, pokemon_cp, pokemon_potential))
self.api.release_pokemon(
pokemon_id=pokemon_data['id'])
response_dict = self.api.call()
sleep(2)

if has_transferred:
logger.log('Pokemon Bag has been cleaned up!', 'green')

def _initial_transfer_get_groups(self):
pokemon_groups = {}
self.api.get_player().get_inventory()
Expand Down

0 comments on commit 18f232b

Please sign in to comment.