mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
[processing] Do not throw exception if help file does not contain valid json
This commit is contained in:
parent
ae47c1a397
commit
744db2ff5a
@ -57,8 +57,11 @@ def getHtmlFromRstFile(rst):
|
||||
def getHtmlFromHelpFile(alg, helpFile):
|
||||
if not os.path.exists(helpFile):
|
||||
return None
|
||||
with open(helpFile) as f:
|
||||
descriptions = json.load(f)
|
||||
try:
|
||||
with open(helpFile) as f:
|
||||
descriptions = json.load(f)
|
||||
except:
|
||||
return None
|
||||
s = '<html><body><h2>Algorithm description</h2>\n'
|
||||
s += '<p>' + getDescription(ALG_DESC, descriptions) + '</p>\n'
|
||||
s += '<h2>Input parameters</h2>\n'
|
||||
|
Loading…
x
Reference in New Issue
Block a user