Skip to content
Permalink
Browse files

[processing] Fixes #11345 - Python error while using Get script from …

…online scripts collection
  • Loading branch information
slarosa committed Oct 7, 2014
1 parent 17ca96f commit dcdf9fb7f60fa825b8319e50e49d4a48079180ee
@@ -159,9 +159,9 @@ def currentItemChanged(self, item, prev):
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 ''

0 comments on commit dcdf9fb

Please sign in to comment.
You can’t perform that action at this time.