提交 363f0002 编写于 作者: A Amador Pahim

html: ignore missing params

If state['params'] is nor present, let's generate the html report
anyway.
Signed-off-by: NAmador Pahim <apahim@redhat.com>
上级 e9284a55
......@@ -121,9 +121,15 @@ class ReportModel(object):
formatted = {}
formatted['uid'] = tst['name'].uid
formatted['name'] = tst['name'].name
params = 'Params:\n'
for path, key, value in tst['params'].iteritems():
params += ' %s:%s => %s\n' % (path, key, value)
params = ''
try:
parameters = 'Params:\n'
for path, key, value in tst['params'].iteritems():
parameters += ' %s:%s => %s\n' % (path, key, value)
except KeyError:
pass
else:
params = parameters
formatted['params'] = params
formatted['variant'] = tst['name'].variant or ''
formatted['status'] = tst['status']
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册