summaryrefslogtreecommitdiffstats
path: root/ci/tier_handler.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2016-05-13 11:01:52 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2016-05-13 11:09:00 +0200
commit4c1c1361b1d3167c167dfdec7431cc39ed442db6 (patch)
tree0a748f5770ea441cb1dcf4a97821bca375745913 /ci/tier_handler.py
parenta7486659a699b1ae0e12a3b3536071171e52bebf (diff)
Catch TypeError exceptions in ci/tier_handler.py
If INSTALLER_TYPE is unset, is_compatible returns False instead of raising an ErrorType exception. Change-Id: I55c219808851907a19e2aa0124eb13d53a5e685d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'ci/tier_handler.py')
-rw-r--r--ci/tier_handler.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ci/tier_handler.py b/ci/tier_handler.py
index dd0d10c9e..2fc7a9c4d 100644
--- a/ci/tier_handler.py
+++ b/ci/tier_handler.py
@@ -108,14 +108,14 @@ class TestCase:
self.description = description
def is_compatible(self, ci_installer, ci_scenario):
- if re.search(self.dependency.get_installer(), ci_installer) is None:
+ try:
+ return not (re.search(self.dependency.get_installer(),
+ ci_installer) is None or
+ re.search(self.dependency.get_scenario(),
+ ci_scenario) is None)
+ except TypeError:
return False
- if re.search(self.dependency.get_scenario(), ci_scenario) is None:
- return False
-
- return True
-
def get_name(self):
return self.name