#NEWLINE# def log( msg , level = xbmc . LOGNOTICE ) : #NEWLINE# #INDENT# level = xbmc . LOGNOTICE #NEWLINE# print ( ( '[SPECTO]: %s' % msg ) ) #NEWLINE# try : #NEWLINE# #INDENT# if isinstance ( a , unicode ) : #NEWLINE# #INDENT# msg = msg . encode ( 'utf-8' ) #NEWLINE# #UNINDENT# xbmc . log ( ( '[SPECTO]: %s' % msg ) , level ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# a = 1 #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# pass