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:
Flavio Ceolin 2020-01-22 10:05:59 -08:00 committed by Anas Nashif
commit 9dbb50bac8

View file

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