Skip to content

Commit

Permalink
Merge pull request #4338 from timlinux/processing-fixes
Browse files Browse the repository at this point in the history
[processing] Added more error handling for cases when processing help causes an error
  • Loading branch information
alexbruy committed Apr 7, 2017
2 parents 2adccb9 + 2308b07 commit a82aba9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion python/plugins/processing/gui/GetScriptsAndModels.py
Expand Up @@ -267,7 +267,13 @@ def setHelp(self, reply, item):
html = self.tr('<h2>No detailed description available for this script</h2>')
else:
content = bytes(reply.readAll()).decode('utf8')
descriptions = json.loads(content)
try:
descriptions = json.loads(content)
except json.decoder.JSONDecodeError:
html = self.tr('<h2>JSON Decoding Error - could not load help</h2>')
except Exception:
html = self.tr('<h2>Unspecified Error - could not load help</h2>')

html = '<h2>%s</h2>' % item.name
html += self.tr('<p><b>Description:</b> {0}</p>').format(getDescription(ALG_DESC, descriptions))
html += self.tr('<p><b>Created by:</b> {0}').format(getDescription(ALG_CREATOR, descriptions))
Expand Down

0 comments on commit a82aba9

Please sign in to comment.