diff options
Diffstat (limited to 'plugins/plugin_examples/dep2.py')
-rw-r--r-- | plugins/plugin_examples/dep2.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/plugin_examples/dep2.py b/plugins/plugin_examples/dep2.py index e8e8f43..1a0e0fd 100644 --- a/plugins/plugin_examples/dep2.py +++ b/plugins/plugin_examples/dep2.py @@ -17,6 +17,8 @@ from pyfirstaidkit.plugins import Plugin,Flow from pyfirstaidkit.returns import * +from pyfirstaidkit.reporting import PLUGIN +from pyfirstaidkit.issue import SimpleIssue class Sample1Plugin(Plugin): """This plugin uses the predefined flow in the Plugin abstract class.""" @@ -25,6 +27,7 @@ class Sample1Plugin(Plugin): author = "Joel Andres Granados" def __init__(self, *args, **kwargs): Plugin.__init__(self, *args, **kwargs) + self._issue = SimpleIssue(self.name, self.description) @classmethod def getDeps(cls): @@ -32,6 +35,7 @@ class Sample1Plugin(Plugin): def prepare(self): self._result=ReturnSuccess + self._issue.set(detected = False, reporting = self._reporting, origin = self, level = PLUGIN) def backup(self): self._result=ReturnSuccess @@ -41,9 +45,11 @@ class Sample1Plugin(Plugin): def diagnose(self): self._result=ReturnSuccess + self._issue.set(detected = True, happened = False, reporting = self._reporting, origin = self, level = PLUGIN) def fix(self): self._result=ReturnFailure + self._issue.set(fixed = False, reporting = self._reporting, origin = self, level = PLUGIN) def clean(self): self._result=ReturnSuccess |