mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
[processing] python3/pyqt5 fixes for get scripts and models dialog
This commit is contained in:
parent
7e0cd9af3d
commit
ac721d3344
@ -194,8 +194,8 @@ class GetScriptsAndModelsDialog(BASE, WIDGET):
|
|||||||
if reply.error() != QNetworkReply.NoError:
|
if reply.error() != QNetworkReply.NoError:
|
||||||
self.popupError(reply.error(), reply.request().url().toString())
|
self.popupError(reply.error(), reply.request().url().toString())
|
||||||
else:
|
else:
|
||||||
resources = str(reply.readAll()).splitlines()
|
resources = bytes(reply.readAll()).decode('utf8').splitlines()
|
||||||
resources = [r.split(',') for r in resources]
|
resources = [r.split(',', 2) for r in resources]
|
||||||
self.resources = {f: (v, n) for f, v, n in resources}
|
self.resources = {f: (v, n) for f, v, n in resources}
|
||||||
|
|
||||||
reply.deleteLater()
|
reply.deleteLater()
|
||||||
@ -242,7 +242,7 @@ class GetScriptsAndModelsDialog(BASE, WIDGET):
|
|||||||
if reply.error() != QNetworkReply.NoError:
|
if reply.error() != QNetworkReply.NoError:
|
||||||
html = self.tr('<h2>No detailed description available for this script</h2>')
|
html = self.tr('<h2>No detailed description available for this script</h2>')
|
||||||
else:
|
else:
|
||||||
content = str(reply.readAll())
|
content = bytes(reply.readAll()).decode('utf8')
|
||||||
descriptions = json.loads(content)
|
descriptions = json.loads(content)
|
||||||
html = '<h2>%s</h2>' % item.name
|
html = '<h2>%s</h2>' % item.name
|
||||||
html += self.tr('<p><b>Description:</b> %s</p>') % getDescription(ALG_DESC, descriptions)
|
html += self.tr('<p><b>Description:</b> %s</p>') % getDescription(ALG_DESC, descriptions)
|
||||||
@ -287,7 +287,7 @@ class GetScriptsAndModelsDialog(BASE, WIDGET):
|
|||||||
self.popupError(reply.error(), reply.request().url().toString())
|
self.popupError(reply.error(), reply.request().url().toString())
|
||||||
content = None
|
content = None
|
||||||
else:
|
else:
|
||||||
content = reply.readAll()
|
content = bytes(reply.readAll()).decode('utf8')
|
||||||
|
|
||||||
reply.deleteLater()
|
reply.deleteLater()
|
||||||
if content:
|
if content:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user