mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[processing] Fixes #11345 - Python error while using Get script from online scripts collection
This commit is contained in:
parent
17ca96fd26
commit
dcdf9fb7f6
@ -159,9 +159,9 @@ class GetScriptsAndModelsDialog(QDialog, Ui_DlgGetScriptsAndModels):
|
||||
helpContent = readUrl(url)
|
||||
descriptions = json.loads(helpContent)
|
||||
html = '<h2>%s</h2>' % item.name
|
||||
html += self.tr('<p><b>Description:</b>%s</p>') % getDescription(ALG_DESC, descriptions)
|
||||
html += self.tr('<p><b>Created by:</b>%s') % getDescription(ALG_CREATOR, descriptions)
|
||||
html += self.tr('<p><b>Version:</b>%s') % getDescription(ALG_VERSION, descriptions)
|
||||
html += self.tr('<p><b>Description:</b> %s</p>') % getDescription(ALG_DESC, descriptions)
|
||||
html += self.tr('<p><b>Created by:</b> %s') % getDescription(ALG_CREATOR, descriptions)
|
||||
html += self.tr('<p><b>Version:</b> %s') % getDescription(ALG_VERSION, descriptions)
|
||||
except HTTPError, e:
|
||||
html = self.tr('<h2>No detailed description available for this script</h2>')
|
||||
self.webView.setHtml(html)
|
||||
|
@ -88,7 +88,7 @@ def getHtmlFromDescriptionsDict(alg, descriptions):
|
||||
|
||||
def getDescription(name, descriptions):
|
||||
if name in descriptions:
|
||||
return descriptions[name].replace("\n", "<br>")
|
||||
return unicode(descriptions[name]).replace("\n", "<br>")
|
||||
else:
|
||||
return ''
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user