Skip to content

Commit 744db2f

Browse files
committed
[processing] Do not throw exception if help file does not contain valid json
1 parent ae47c1a commit 744db2f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

python/plugins/processing/gui/Help2Html.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@ def getHtmlFromRstFile(rst):
5757
def getHtmlFromHelpFile(alg, helpFile):
5858
if not os.path.exists(helpFile):
5959
return None
60-
with open(helpFile) as f:
61-
descriptions = json.load(f)
60+
try:
61+
with open(helpFile) as f:
62+
descriptions = json.load(f)
63+
except:
64+
return None
6265
s = '<html><body><h2>Algorithm description</h2>\n'
6366
s += '<p>' + getDescription(ALG_DESC, descriptions) + '</p>\n'
6467
s += '<h2>Input parameters</h2>\n'

0 commit comments

Comments
 (0)