scripts: sanitycheck: Simplify if statement
Outer if is checking if the variable is in a list with two options which means that we can just do an if / else and remove an assignment. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
91920268e0
commit
9dbb50bac8
1 changed files with 1 additions and 3 deletions
|
@ -3026,15 +3026,13 @@ class TestSuite:
|
|||
classname="%s:%s" % (instance.platform.name, os.path.basename(instance.testcase.name)),
|
||||
name="%s" % (k), time="%f" % handler_time)
|
||||
if instance.results[k] in ['FAIL', 'BLOCK']:
|
||||
el = None
|
||||
|
||||
if instance.results[k] == 'FAIL':
|
||||
el = ET.SubElement(
|
||||
eleTestcase,
|
||||
'failure',
|
||||
type="failure",
|
||||
message="failed")
|
||||
elif instance.results[k] == 'BLOCK':
|
||||
else:
|
||||
el = ET.SubElement(
|
||||
eleTestcase,
|
||||
'error',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue