summaryrefslogtreecommitdiff
path: root/tests/cloud_tests/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cloud_tests/util.py')
-rw-r--r--tests/cloud_tests/util.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/cloud_tests/util.py b/tests/cloud_tests/util.py
index 2aedcd0d..6ff285e7 100644
--- a/tests/cloud_tests/util.py
+++ b/tests/cloud_tests/util.py
@@ -321,9 +321,9 @@ class TargetBase(object):
rcs = (0,)
if description:
- LOG.debug('Executing "%s"', description)
+ LOG.debug('executing "%s"', description)
else:
- LOG.debug("Executing command: %s", shell_quote(command))
+ LOG.debug("executing command: %s", shell_quote(command))
out, err, rc = self._execute(command=command, stdin=stdin, env=env)
@@ -447,6 +447,19 @@ class InTargetExecuteError(c_util.ProcessExecutionError):
reason=reason)
+class PlatformError(IOError):
+ """Error type for platform errors."""
+
+ default_desc = 'unexpected error in platform.'
+
+ def __init__(self, operation, description=None):
+ """Init error and parent error class."""
+ description = description if description else self.default_desc
+
+ message = '%s: %s' % (operation, description)
+ IOError.__init__(self, message)
+
+
class TempDir(object):
"""Configurable temporary directory like tempfile.TemporaryDirectory."""