From 9dbb50bac8bb7bb19729db5db9bb3c44024dc2e7 Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Wed, 22 Jan 2020 10:05:59 -0800 Subject: [PATCH] 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 --- scripts/sanitycheck | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/sanitycheck b/scripts/sanitycheck index 6f8fbe12065..d431ce3dbc7 100755 --- a/scripts/sanitycheck +++ b/scripts/sanitycheck @@ -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',