From c159f9abadd5cc991fb23ed3565f466511030852 Mon Sep 17 00:00:00 2001 From: lorenz Date: Wed, 3 Oct 2018 09:17:10 +0200 Subject: [PATCH] py3: fix unicode problem --- src/Mod/Start/StartPage/StartPage.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py index fbecc71b4b..302ddaf250 100644 --- a/src/Mod/Start/StartPage/StartPage.py +++ b/src/Mod/Start/StartPage/StartPage.py @@ -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