Skip to content

Commit

Permalink
[processing] python3/pyqt5 fixes for get scripts and models dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn authored and m-kuhn committed Nov 24, 2016
1 parent 7e0cd9a commit ac721d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/plugins/processing/gui/GetScriptsAndModels.py
Expand Up @@ -194,8 +194,8 @@ def treeLoaded(self, reply):
if reply.error() != QNetworkReply.NoError:
self.popupError(reply.error(), reply.request().url().toString())
else:
resources = str(reply.readAll()).splitlines()
resources = [r.split(',') for r in resources]
resources = bytes(reply.readAll()).decode('utf8').splitlines()
resources = [r.split(',', 2) for r in resources]
self.resources = {f: (v, n) for f, v, n in resources}

reply.deleteLater()
Expand Down Expand Up @@ -242,7 +242,7 @@ def setHelp(self, reply, item):
if reply.error() != QNetworkReply.NoError:
html = self.tr('<h2>No detailed description available for this script</h2>')
else:
content = str(reply.readAll())
content = bytes(reply.readAll()).decode('utf8')
descriptions = json.loads(content)
html = '<h2>%s</h2>' % item.name
html += self.tr('<p><b>Description:</b> %s</p>') % getDescription(ALG_DESC, descriptions)
Expand Down Expand Up @@ -287,7 +287,7 @@ def storeFile(self, reply, filename):
self.popupError(reply.error(), reply.request().url().toString())
content = None
else:
content = reply.readAll()
content = bytes(reply.readAll()).decode('utf8')

reply.deleteLater()
if content:
Expand Down

0 comments on commit ac721d3

Please sign in to comment.