Skip to content

Commit

Permalink
Fix instance where evolve_all is unicode - fixes PokemonGoF#2281 (Pok…
Browse files Browse the repository at this point in the history
…emonGoF#2305)

* Fix instance where evolve_all is unicode

* Test for isinstance basestring rather than Unicode || str
  • Loading branch information
JSchwerberg authored and Zhou committed Aug 2, 2016
1 parent 5728e46 commit 71ec59f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pokemongo_bot/cell_workers/evolve_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ def initialize(self):
self.evolve_cp_min = self.config.get('evolve_cp_min', 300)
self.evolve_num_min = self.config.get('evolve_num_min', 5)
self.use_lucky_egg = self.config.get('use_lucky_egg', False)
self._validate_config()

def _validate_config(self):
if isinstance(self.evolve_all, str):
if isinstance(self.evolve_all, basestring):
self.evolve_all = [str(pokemon_name) for pokemon_name in self.evolve_all.split(',')]

def work(self):
Expand Down

0 comments on commit 71ec59f

Please sign in to comment.