summaryrefslogtreecommitdiff
path: root/vmdb/step_list.py
diff options
context:
space:
mode:
Diffstat (limited to 'vmdb/step_list.py')
-rw-r--r--vmdb/step_list.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/vmdb/step_list.py b/vmdb/step_list.py
index f69b4bc..20e3ec6 100644
--- a/vmdb/step_list.py
+++ b/vmdb/step_list.py
@@ -16,6 +16,9 @@
# =*= License: GPL-3+ =*=
+import logging
+
+
import cliapp
@@ -75,12 +78,20 @@ class StepRunnerList:
class StepError(cliapp.AppException):
- pass
+ def __init__(self, msg):
+ logging.error(msg)
+ super().__init__(msg)
-class NoMatchingRunner(cliapp.AppException):
+class NoMatchingRunner(StepError):
def __init__(self, keys):
- super(NoMatchingRunner, self).__init__(
- 'No runner implements step with keys {}'.format(
- ', '.join(keys)))
+ super().__init__(
+ 'No runner implements step with keys {}'.format(', '.join(keys)))
+
+
+class NotString(StepError): # pragma: no cover
+
+ def __init__(self, name, actual):
+ msg = '%s: value must be string, got %r' % (name, actual)
+ super().__init__(msg)