summaryrefslogtreecommitdiffstats
path: root/pyfirstaidkit
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2008-03-19 11:25:30 +0100
committerMartin Sivak <msivak@redhat.com>2008-03-19 11:25:30 +0100
commitc9c2cb4edec91985bbaf58d25fe918b22457a4b3 (patch)
tree129ce2d2f7f18f4d054f0073397a42b84de56d6e /pyfirstaidkit
parent1b34958d6340403ce9c5d1f715d7edfcd74071b0 (diff)
downloadfirstaidkit-c9c2cb4edec91985bbaf58d25fe918b22457a4b3.tar.gz
firstaidkit-c9c2cb4edec91985bbaf58d25fe918b22457a4b3.tar.xz
firstaidkit-c9c2cb4edec91985bbaf58d25fe918b22457a4b3.zip
Add fixed() query function into the Issue class
Diffstat (limited to 'pyfirstaidkit')
-rw-r--r--pyfirstaidkit/issue.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/pyfirstaidkit/issue.py b/pyfirstaidkit/issue.py
index caf9822..aa84be5 100644
--- a/pyfirstaidkit/issue.py
+++ b/pyfirstaidkit/issue.py
@@ -67,6 +67,18 @@ Return values:
else:
return self._happened
+ def fixed(self):
+ """Get the 'issue fixed' flag.
+Return values:
+ True - YES it is fixed
+ False - NO, it is still broken
+ None - I don't know"""
+ #if the issue was not detected, the detection si needed
+ if not self._detected:
+ return None
+ else:
+ #issue didn't happened or is fixed -> True
+ return not self._happened or self._fixed
def reset(self):
"""Reset the object's state"""