Commit 53c57de9 authored by Rémi Duraffort's avatar Rémi Duraffort Committed by Senthil Kumaran Shanmugasundaram

Fix crash when test case metadata is empty

Change-Id: Ie45cf3f855190bcbb63c434297b47bf3854c73a2
parent 99c32f4d
......@@ -428,10 +428,12 @@ def testcase(request, case_id, job=None, pk=None):
for extra_case in test_cases:
f_metadata = yaml.load(extra_case.metadata, Loader=yaml.CLoader)
if not f_metadata:
except TypeError:"Unable to load extra case metadata for %s", extra_case)
f_metadata = {}
extra_data = f_metadata.get('extra', None)
extra_data = f_metadata.get('extra')
if extra_data and os.path.exists(extra_data):
with open(f_metadata['extra'], 'r') as extra_file:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment