summaryrefslogtreecommitdiffstats
path: root/pyfirstaidkit
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2008-04-22 18:10:28 +0200
committerMartin Sivak <msivak@redhat.com>2008-04-22 18:10:28 +0200
commit055575bcc6bc33c29456f663dd8d75993d30427c (patch)
treebbf81cf5fbdc0b839ab90b69ceb47c2c783816f6 /pyfirstaidkit
parentd9a16bf880cc2e160cc5d0b2623becbe8807d704 (diff)
downloadfirstaidkit-055575bcc6bc33c29456f663dd8d75993d30427c.tar.gz
firstaidkit-055575bcc6bc33c29456f663dd8d75993d30427c.tar.xz
firstaidkit-055575bcc6bc33c29456f663dd8d75993d30427c.zip
Move some methods to SimpleIssue class
Diffstat (limited to 'pyfirstaidkit')
-rw-r--r--pyfirstaidkit/issue.py50
1 files changed, 25 insertions, 25 deletions
diff --git a/pyfirstaidkit/issue.py b/pyfirstaidkit/issue.py
index a02629f..f8cc36f 100644
--- a/pyfirstaidkit/issue.py
+++ b/pyfirstaidkit/issue.py
@@ -31,6 +31,31 @@ class SimpleIssue(object):
self._happened = False
self._fixed = False
+ def happened(self):
+ """Get the 'issue happened' flag.
+Return values:
+ True - YES it happened
+ False - NO, it is OK
+ None - I don't know, there was an error"""
+ #if the issue was fixed or not detected, the detection si needed
+ if not self._detected or self._fixed:
+ return None
+ 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 __str__(self):
s = []
if self._fixed:
@@ -90,28 +115,3 @@ Return values:
return None #no fix error, please do the fix (so the child-class knows to actually do something)
- def happened(self):
- """Get the 'issue happened' flag.
-Return values:
- True - YES it happened
- False - NO, it is OK
- None - I don't know, there was an error"""
- #if the issue was fixed or not detected, the detection si needed
- if not self._detected or self._fixed:
- return None
- 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
-