Skip to content

Commit

Permalink
[processing] Fixes #11345 - Python error while using Get script from …
Browse files Browse the repository at this point in the history
…online scripts collection
  • Loading branch information
slarosa committed Oct 7, 2014
1 parent 17ca96f commit dcdf9fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions python/plugins/processing/gui/GetScriptsAndModels.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/gui/Help2Html.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''

Expand Down

0 comments on commit dcdf9fb

Please sign in to comment.