aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/common
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-06-01 13:49:38 +0100
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-06-01 16:32:55 +0100
commit2bdda85878ed1507d1a91f69c3489bb9ba9d447d (patch)
treeddfb163a65d3eb420444a64b995d65e22dba4dbd /yardstick/common
parentdde8fa628483deec352e176cea8decdbf6bed7e8 (diff)
Move ErrorClass definition to exceptions module
JIRA: YARDSTICK-1216 Change-Id: I82556e1d1b0c723221a58e188067cbce560b8338 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Diffstat (limited to 'yardstick/common')
-rw-r--r--yardstick/common/exceptions.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/yardstick/common/exceptions.py b/yardstick/common/exceptions.py
index a9f9fffa5..40703e623 100644
--- a/yardstick/common/exceptions.py
+++ b/yardstick/common/exceptions.py
@@ -21,6 +21,16 @@ class ProcessExecutionError(RuntimeError):
self.returncode = returncode
+class ErrorClass(object):
+
+ def __init__(self, *args, **kwargs):
+ if 'test' not in kwargs:
+ raise RuntimeError
+
+ def __getattr__(self, item):
+ raise AttributeError
+
+
class YardstickException(Exception):
"""Base Yardstick Exception.