Skip to content

Commit

Permalink
Fixing another utf8 exception. (#5111)
Browse files Browse the repository at this point in the history
  • Loading branch information
solderzzc authored Sep 2, 2016
1 parent 0bb501e commit e9f699e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pokemongo_bot/event_handlers/social_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@ def connect_to_mqtt(self):
return
def run(self):
while True:
self._mqttc.loop_forever(timeout=30.0, max_packets=100, retry_first_connection=False)
print 'Oops disconnected ?'
time.sleep(20)
try:
self._mqttc.loop_forever(timeout=30.0, max_packets=100, retry_first_connection=False)
print 'Oops disconnected ?'
time.sleep(20)
except UnicodeDecodeError:
time.sleep(1)
class SocialHandler(EventHandler):
def __init__(self, bot):
self.bot = bot
Expand Down

0 comments on commit e9f699e

Please sign in to comment.