Skip to content

Commit ac721d3

Browse files
nirvnm-kuhn
authored andcommittedNov 24, 2016
[processing] python3/pyqt5 fixes for get scripts and models dialog
1 parent 7e0cd9a commit ac721d3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎python/plugins/processing/gui/GetScriptsAndModels.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ def treeLoaded(self, reply):
194194
if reply.error() != QNetworkReply.NoError:
195195
self.popupError(reply.error(), reply.request().url().toString())
196196
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]
199199
self.resources = {f: (v, n) for f, v, n in resources}
200200

201201
reply.deleteLater()
@@ -242,7 +242,7 @@ def setHelp(self, reply, item):
242242
if reply.error() != QNetworkReply.NoError:
243243
html = self.tr('<h2>No detailed description available for this script</h2>')
244244
else:
245-
content = str(reply.readAll())
245+
content = bytes(reply.readAll()).decode('utf8')
246246
descriptions = json.loads(content)
247247
html = '<h2>%s</h2>' % item.name
248248
html += self.tr('<p><b>Description:</b> %s</p>') % getDescription(ALG_DESC, descriptions)
@@ -287,7 +287,7 @@ def storeFile(self, reply, filename):
287287
self.popupError(reply.error(), reply.request().url().toString())
288288
content = None
289289
else:
290-
content = reply.readAll()
290+
content = bytes(reply.readAll()).decode('utf8')
291291

292292
reply.deleteLater()
293293
if content:

0 commit comments

Comments
 (0)
Please sign in to comment.