Skip to content

Commit

Permalink
Trying to fix problem with accentuation.
Browse files Browse the repository at this point in the history
  • Loading branch information
muammar committed Aug 14, 2016
1 parent 1fbc71f commit c6c646e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mkchromecast/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ def initialize_cast(self):
print(colors.important('Index Friendly name'))
print(colors.important('===== ============= '))
for self.index,device in enumerate(self.cclist):
print(str(self.index)+' ', str(device))
try:
print(str(self.index)+' ', str(device))
except UnicodeEncodeError:
print(str(self.index)+' ', str(unicode(device).encode("utf-8")))
print(' ')
print(colors.important('We will cast to first device in the list above!'))
print(' ')
Expand Down Expand Up @@ -332,6 +335,9 @@ def availablecc(self):
"""
self.availablecc=[]
for self.index,device in enumerate(self.cclist):
print(str(self.index)+' ',str(device))
try:
print(str(self.index)+' ', str(device))
except UnicodeEncodeError:
print(str(self.index)+' ', str(unicode(device).encode("utf-8")))
toappend = [self.index,device]
self.availablecc.append(toappend)

0 comments on commit c6c646e

Please sign in to comment.