summaryrefslogtreecommitdiffstats
path: root/pyfirstaidkit
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2008-05-05 15:46:03 +0200
committerMartin Sivak <msivak@redhat.com>2008-05-05 15:46:03 +0200
commitc227496fa86c36762018c2a8219f2136ec63fa10 (patch)
treebfb78ba5c544f81f312e3bdf45d484817403876b /pyfirstaidkit
parent1091439ad887d4dfb09e602e6efd6ed9968d2b82 (diff)
downloadfirstaidkit-c227496fa86c36762018c2a8219f2136ec63fa10.tar.gz
firstaidkit-c227496fa86c36762018c2a8219f2136ec63fa10.tar.xz
firstaidkit-c227496fa86c36762018c2a8219f2136ec63fa10.zip
Some API improvements, so the developer do not have to care about the issue reporting that much
Diffstat (limited to 'pyfirstaidkit')
-rw-r--r--pyfirstaidkit/issue.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/pyfirstaidkit/issue.py b/pyfirstaidkit/issue.py
index f8cc36f..65e47db 100644
--- a/pyfirstaidkit/issue.py
+++ b/pyfirstaidkit/issue.py
@@ -31,6 +31,17 @@ class SimpleIssue(object):
self._happened = False
self._fixed = False
+ def set(self, happened = None, fixed = None, detected = None, reporting = None, **kwreportingargs):
+ """Set the state of this issue and send a report (if reporting is not None)"""
+ if happened:
+ self._happened = happened
+ if fixed:
+ self._fixed = fixed
+ if detected:
+ self._detected = detected
+ if reporting:
+ reporting.issue(issue = self, **kwreportingargs)
+
def happened(self):
"""Get the 'issue happened' flag.
Return values: