aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/ci/tier_handler.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-03-19 09:51:37 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-03-19 10:35:57 +0100
commit489977b2de4fd448705debb2a48d65ad41650bca (patch)
tree5b639b28ec9282cd07c904d71545178b549898ec /xtesting/ci/tier_handler.py
parentc74456f3ad8f9144f0e773de68b75b249e876d47 (diff)
Fix regex when INSTALLER_TYPE is unset
Change-Id: I0ec012185f3c90b2a2c82b6f204ce332f3fa9c7f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'xtesting/ci/tier_handler.py')
-rw-r--r--xtesting/ci/tier_handler.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/xtesting/ci/tier_handler.py b/xtesting/ci/tier_handler.py
index 9fc3f24d..915985f5 100644
--- a/xtesting/ci/tier_handler.py
+++ b/xtesting/ci/tier_handler.py
@@ -113,20 +113,18 @@ class TestCase(object):
self.description = description
self.project = project
- @staticmethod
- def is_none(item):
- return item is None or item == ""
-
def is_compatible(self, ci_installer, ci_scenario):
try:
- if not self.is_none(ci_installer):
- if re.search(self.dependency.get_installer(),
- ci_installer) is None:
+ if not ci_installer:
+ if self.dependency.get_installer():
return False
- if not self.is_none(ci_scenario):
- if re.search(self.dependency.get_scenario(),
- ci_scenario) is None:
+ elif not re.search(self.dependency.get_installer(), ci_installer):
+ return False
+ if not ci_scenario:
+ if self.dependency.get_scenario():
return False
+ elif not re.search(self.dependency.get_scenario(), ci_scenario):
+ return False
return True
except TypeError:
return False