summaryrefslogtreecommitdiffstats
path: root/plugins/plugin_examples/sample3Plugin/sample3Plugin.py
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2008-02-26 15:19:42 +0100
committerMartin Sivak <msivak@redhat.com>2008-02-26 15:19:42 +0100
commitcd646619dd4723f8e4ac7325c3cc5e81193dbd40 (patch)
tree5575a412a13c8df27f93541d5933a174dfb19ba6 /plugins/plugin_examples/sample3Plugin/sample3Plugin.py
parentcfe9ad54127a42b79f9057d341ec94099630b884 (diff)
downloadfirstaidkit-cd646619dd4723f8e4ac7325c3cc5e81193dbd40.tar.gz
firstaidkit-cd646619dd4723f8e4ac7325c3cc5e81193dbd40.tar.xz
firstaidkit-cd646619dd4723f8e4ac7325c3cc5e81193dbd40.zip
Rename the Return* classes to more sane names and update everything to use them
Fix the NoOptionError exception throwing in configuration Add the -a|--auto parameter to launch the automatic mode of operation
Diffstat (limited to 'plugins/plugin_examples/sample3Plugin/sample3Plugin.py')
-rw-r--r--plugins/plugin_examples/sample3Plugin/sample3Plugin.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/plugin_examples/sample3Plugin/sample3Plugin.py b/plugins/plugin_examples/sample3Plugin/sample3Plugin.py
index 5d2e362..e58c8dc 100644
--- a/plugins/plugin_examples/sample3Plugin/sample3Plugin.py
+++ b/plugins/plugin_examples/sample3Plugin/sample3Plugin.py
@@ -36,9 +36,9 @@ class Sample3Plugin(Plugin):
(out, err) = proc.communicate()
out = out.strip()
if out[-5:] == "false":
- self._result=ReturnUnfavorable
+ self._result=ReturnFailure
elif out[-4:] == "true":
- self._result=ReturnFavorable
+ self._result=ReturnSuccess
def clean(self):
clean = [Config.plugin.path+"/sample3Plugin/plugin", "--task", "clean"]
@@ -46,9 +46,9 @@ class Sample3Plugin(Plugin):
(out, err) = proc.communicate()
out = out.strip()
if out[-5:] == "false":
- self._result=ReturnUnfavorable
+ self._result=ReturnFailure
elif out[-4:] == "true":
- self._result=ReturnFavorable
+ self._result=ReturnSuccess
def backup(self):
backup = [Config.plugin.path+"/sample3Plugin/plugin", "--task", "backup"]
@@ -56,9 +56,9 @@ class Sample3Plugin(Plugin):
(out, err) = proc.communicate()
out = out.strip()
if out[-5:] == "false":
- self._result=ReturnUnfavorable
+ self._result=ReturnFailure
elif out[-4:] == "true":
- self._result=ReturnFavorable
+ self._result=ReturnSuccess
def restore(self):
restore = [Config.plugin.path+"/sample3Plugin/plugin", "--task", "restore"]
@@ -66,9 +66,9 @@ class Sample3Plugin(Plugin):
(out, err) = proc.communicate()
out = out.strip()
if out[-5:] == "false":
- self._result=ReturnUnfavorable
+ self._result=ReturnFailure
elif out[-4:] == "true":
- self._result=ReturnFavorable
+ self._result=ReturnSuccess
def diagnose(self):
diagnose = [Config.plugin.path+"/sample3Plugin/plugin", "--task", "diagnose"]
@@ -76,9 +76,9 @@ class Sample3Plugin(Plugin):
(out, err) = proc.communicate()
out = out.strip()
if out[-5:] == "false":
- self._result=ReturnUnfavorable
+ self._result=ReturnFailure
elif out[-4:] == "true":
- self._result=ReturnFavorable
+ self._result=ReturnSuccess
def fix(self):
fix = [Config.plugin.path+"/sample3Plugin/plugin", "--task", "fix"]
@@ -86,6 +86,6 @@ class Sample3Plugin(Plugin):
(out, err) = proc.communicate()
out = out.strip()
if out[-5:] == "false":
- self._result=ReturnUnfavorable
+ self._result=ReturnFailure
elif out[-4:] == "true":
- self._result=ReturnFavorable
+ self._result=ReturnSuccess