diff options
author | Martin Sivak <msivak@redhat.com> | 2008-05-05 15:46:03 +0200 |
---|---|---|
committer | Martin Sivak <msivak@redhat.com> | 2008-05-05 15:46:03 +0200 |
commit | c227496fa86c36762018c2a8219f2136ec63fa10 (patch) | |
tree | bfb78ba5c544f81f312e3bdf45d484817403876b /pyfirstaidkit | |
parent | 1091439ad887d4dfb09e602e6efd6ed9968d2b82 (diff) | |
download | firstaidkit-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.py | 11 |
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: |