Skip to content

Commit

Permalink
Merge pull request #6136 from goedzo/Fixing-#6123
Browse files Browse the repository at this point in the history
  • Loading branch information
Jcolomar authored Jul 25, 2017
2 parents 15b2b56 + 7829fa6 commit 850713a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pokemongo_bot/event_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ def __init__(self, event, sender=None, level='info', formatted='', data={}):
self.level = str(level).encode('ascii', 'xmlcharrefreplace')

#Fixing issue 6123 for gym names that are in utf format.
self.formatted = str(formatted).encode('utf-8', 'ignore').decode('utf-8')
self.formatted = str(formatted).encode('ascii', 'xmlcharrefreplace')
try:
self.formatted = str(formatted).encode('ascii', 'xmlcharrefreplace')
except UnicodeEncodeError:
self.formatted = str(unicode(formatted).encode('unicode_escape'))

self.data = str(data).encode('ascii', 'xmlcharrefreplace')
self.friendly_msg = ""
Expand Down

0 comments on commit 850713a

Please sign in to comment.