From 083faa07417a37c98219bd4b0326c9397769be0c Mon Sep 17 00:00:00 2001 From: Attila Fazekas Date: Wed, 27 Jul 2016 15:35:39 +0200 Subject: [PATCH] Simplify logic in _get_test_list _get_test_list had the same action for the elif case, it was replaced by 'or' . Change-Id: I2be9974beea3ca398d61e58726a63518b15cf3c4 --- os_testr/regex_builder.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/os_testr/regex_builder.py b/os_testr/regex_builder.py index acba769..8c9f3ca 100644 --- a/os_testr/regex_builder.py +++ b/os_testr/regex_builder.py @@ -29,10 +29,7 @@ def _get_test_list(regex, env=None): 'subunit.run discover'] for line in raw_test_list: for exclude in exclude_list: - if exclude in line: - bad = True - break - elif not line: + if exclude in line or not line: bad = True break if not bad: