[processing] Do not throw exception if help file does not contain valid json

This commit is contained in:
Victor Olaya 2014-06-10 18:35:28 +02:00
parent ae47c1a397
commit 744db2ff5a

View File

@ -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'