Skip to content

Commit

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

* Test for isinstance basestring rather than Unicode || str
  • Loading branch information
JSchwerberg authored and douglascamata committed Aug 2, 2016
1 parent 5927c3b commit 550b2c3
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 @@ -9,9 +9,10 @@ def initialize(self):
self.evolve_speed = self.config.get('evolve_speed', 3.7)
self.evolve_cp_min = self.config.get('evolve_cp_min', 300)
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 550b2c3

Please sign in to comment.