Skip to content

Commit

Permalink
Fix unicodeEncodeError (1157ec3#commitcomment-9534415)
Browse files Browse the repository at this point in the history
  • Loading branch information
razzeee committed Feb 1, 2015
1 parent 1157ec3 commit 02b6d67
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions utilities.py
Expand Up @@ -39,9 +39,14 @@

def Debug(msg, force = False):
if getSettingAsBool('debug') or force:
xbmc.log("[trakt] " + msg, level=xbmc.LOGNOTICE)
debuglevel = xbmc.LOGNOTICE
else:
xbmc.log("[trakt] " + msg, level=xbmc.LOGDEBUG)
debuglevel = xbmc.LOGDEBUG

try:
xbmc.log("[trakt] " + msg, level=debuglevel)
except UnicodeEncodeError:
xbmc.log("[trakt] " + msg.encode('utf-8', 'ignore'))


def notification(header, message, time=5000, icon=__addon__.getAddonInfo('icon')):
Expand Down

0 comments on commit 02b6d67

Please sign in to comment.