From: Ondrej Lichtner <olichtne(a)redhat.com>
The Result class should be used for results explicitly created by the
tester (instead of automatic results of LNST jobs). This makes the
Result class instances more important so I set the default level to
IMPORTANT.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Controller/RecipeResults.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lnst/Controller/RecipeResults.py b/lnst/Controller/RecipeResults.py
index 97308bf..6b42a83 100644
--- a/lnst/Controller/RecipeResults.py
+++ b/lnst/Controller/RecipeResults.py
@@ -97,11 +97,13 @@ class Result(BaseResult):
Will be created when the tester calls the Recipe interface for adding
results."""
- def __init__(self, success, short_desc="", data=None):
+ def __init__(self, success, short_desc="", data=None,
+ level=ResultLevel.IMPORTANT):
super(Result, self).__init__(success)
self._short_desc = short_desc
self._data = data
+ self._level = level
@BaseResult.short_desc.getter
def short_desc(self):
@@ -110,3 +112,7 @@ class Result(BaseResult):
@BaseResult.data.getter
def data(self):
return self._data
+
+ @BaseResult.level.getter
+ def level(self):
+ return self._level
--
2.17.0