summaryrefslogtreecommitdiffstats
path: root/roles/openshift_health_checker/action_plugins
diff options
context:
space:
mode:
authorRodolfo Carvalho <rhcarvalho@gmail.com>2017-08-21 14:27:19 +0200
committerRodolfo Carvalho <rhcarvalho@gmail.com>2017-08-24 15:00:34 +0200
commit51645eab599b0b23c582e22a9e84ce9423362ab1 (patch)
treecd118a28f379e59466849afa6bb1e5c29bfcc0d5 /roles/openshift_health_checker/action_plugins
parent8216ea6e6eff5f60ad3aeddd602f2ab3979117df (diff)
downloadopenshift-51645eab599b0b23c582e22a9e84ce9423362ab1.tar.gz
openshift-51645eab599b0b23c582e22a9e84ce9423362ab1.tar.bz2
openshift-51645eab599b0b23c582e22a9e84ce9423362ab1.tar.xz
openshift-51645eab599b0b23c582e22a9e84ce9423362ab1.zip
Update error message: s/non-unique/duplicate
Diffstat (limited to 'roles/openshift_health_checker/action_plugins')
-rw-r--r--roles/openshift_health_checker/action_plugins/openshift_health_check.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/roles/openshift_health_checker/action_plugins/openshift_health_check.py b/roles/openshift_health_checker/action_plugins/openshift_health_check.py
index f80a53030..8d35db6b5 100644
--- a/roles/openshift_health_checker/action_plugins/openshift_health_check.py
+++ b/roles/openshift_health_checker/action_plugins/openshift_health_check.py
@@ -86,12 +86,10 @@ class ActionModule(ActionBase):
name = cls.name
if name in known_checks:
other_cls = known_checks[name].__class__
- msg = "non-unique check name '{}' in: '{}' and '{}'".format(
- name,
- full_class_name(cls),
- full_class_name(other_cls),
+ raise OpenShiftCheckException(
+ "duplicate check name '{}' in: '{}' and '{}'"
+ "".format(name, full_class_name(cls), full_class_name(other_cls))
)
- raise OpenShiftCheckException(msg)
known_checks[name] = cls(execute_module=self._execute_module, tmp=tmp, task_vars=task_vars)
return known_checks