py3: fix unicode problem
This commit is contained in:
@@ -35,7 +35,6 @@ iconprovider = QtGui.QFileIconProvider()
|
||||
iconbank = {} # to store already created icons so we don't overpollute the temp dir
|
||||
tempfolder = None # store icons inside a subfolder in temp dir
|
||||
|
||||
|
||||
def gethexcolor(color):
|
||||
|
||||
"returns a color hex value #000000"
|
||||
@@ -475,10 +474,9 @@ def handle():
|
||||
|
||||
# encode if necessary
|
||||
|
||||
if sys.version_info.major < 3:
|
||||
if isinstance(HTML,unicode):
|
||||
HTML = HTML.encode("utf8")
|
||||
|
||||
if not isinstance(HTML, bytes):
|
||||
HTML = HTML.encode("utf8")
|
||||
|
||||
return HTML
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user