Skip to content

Commit

Permalink
Fixed systray to play nice with UnicodeEncodeError.
Browse files Browse the repository at this point in the history
  • Loading branch information
muammar committed Aug 14, 2016
1 parent 475b019 commit a85b2df
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mkchromecast/systray.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,10 @@ def cast_list(self):
print('Available Google Cast Devices', self.availablecc)
for index, menuentry in enumerate(self.availablecc):
self.entries = menuentry
self.menuentry = self.menu.addAction(str(menuentry[1]))
try:
self.menuentry = self.menu.addAction(str(menuentry[1]))
except UnicodeEncodeError:
self.menuentry = self.menu.addAction(str(unicode(menuentry[1]).encode("utf-8")))
self.menuentry.triggered.connect(self.play_cast)
self.menuentry.setCheckable(True)
self.separator_menu()
Expand Down

0 comments on commit a85b2df

Please sign in to comment.