@@ -194,8 +194,8 @@ def treeLoaded(self, reply):
194
194
if reply .error () != QNetworkReply .NoError :
195
195
self .popupError (reply .error (), reply .request ().url ().toString ())
196
196
else :
197
- resources = str (reply .readAll ()).splitlines ()
198
- resources = [r .split (',' ) for r in resources ]
197
+ resources = bytes (reply .readAll ()). decode ( 'utf8' ).splitlines ()
198
+ resources = [r .split (',' , 2 ) for r in resources ]
199
199
self .resources = {f : (v , n ) for f , v , n in resources }
200
200
201
201
reply .deleteLater ()
@@ -242,7 +242,7 @@ def setHelp(self, reply, item):
242
242
if reply .error () != QNetworkReply .NoError :
243
243
html = self .tr ('<h2>No detailed description available for this script</h2>' )
244
244
else :
245
- content = str (reply .readAll ())
245
+ content = bytes (reply .readAll ()). decode ( 'utf8' )
246
246
descriptions = json .loads (content )
247
247
html = '<h2>%s</h2>' % item .name
248
248
html += self .tr ('<p><b>Description:</b> %s</p>' ) % getDescription (ALG_DESC , descriptions )
@@ -287,7 +287,7 @@ def storeFile(self, reply, filename):
287
287
self .popupError (reply .error (), reply .request ().url ().toString ())
288
288
content = None
289
289
else :
290
- content = reply .readAll ()
290
+ content = bytes ( reply .readAll ()). decode ( 'utf8' )
291
291
292
292
reply .deleteLater ()
293
293
if content :
0 commit comments