diff options
author | Martin Sivak <msivak@redhat.com> | 2008-03-05 11:06:01 +0100 |
---|---|---|
committer | Martin Sivak <msivak@redhat.com> | 2008-03-05 11:06:01 +0100 |
commit | 379616173fb52318300334efdee234a251ad8302 (patch) | |
tree | 6df544404c347aa7d542e1e4763a909896ff144a /plugins/plugin_examples/sample3Plugin/sample3Plugin.py | |
parent | 01582a1a4fd27d8b3012de4da8c70a3d8212774b (diff) | |
download | firstaidkit-379616173fb52318300334efdee234a251ad8302.tar.gz firstaidkit-379616173fb52318300334efdee234a251ad8302.tar.xz firstaidkit-379616173fb52318300334efdee234a251ad8302.zip |
When instantiating plugin, pass the path to the plugin, so it knows where to find it's parts
Diffstat (limited to 'plugins/plugin_examples/sample3Plugin/sample3Plugin.py')
-rw-r--r-- | plugins/plugin_examples/sample3Plugin/sample3Plugin.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/plugin_examples/sample3Plugin/sample3Plugin.py b/plugins/plugin_examples/sample3Plugin/sample3Plugin.py index e58c8dc..cac5f70 100644 --- a/plugins/plugin_examples/sample3Plugin/sample3Plugin.py +++ b/plugins/plugin_examples/sample3Plugin/sample3Plugin.py @@ -31,7 +31,7 @@ class Sample3Plugin(Plugin): def prepare(self): # Prepare command line. - prepare = [Config.plugin.path+"/sample3Plugin/plugin", "--task", "prepare"] + prepare = [self._path + "/plugin", "--task", "prepare"] proc = subprocess.Popen(prepare, stdout=subprocess.PIPE) (out, err) = proc.communicate() out = out.strip() @@ -41,7 +41,7 @@ class Sample3Plugin(Plugin): self._result=ReturnSuccess def clean(self): - clean = [Config.plugin.path+"/sample3Plugin/plugin", "--task", "clean"] + clean = [self._path+"/plugin", "--task", "clean"] proc = subprocess.Popen(clean, stdout=subprocess.PIPE) (out, err) = proc.communicate() out = out.strip() @@ -51,7 +51,7 @@ class Sample3Plugin(Plugin): self._result=ReturnSuccess def backup(self): - backup = [Config.plugin.path+"/sample3Plugin/plugin", "--task", "backup"] + backup = [self._path+"/plugin", "--task", "backup"] proc = subprocess.Popen(backup, stdout=subprocess.PIPE) (out, err) = proc.communicate() out = out.strip() @@ -61,7 +61,7 @@ class Sample3Plugin(Plugin): self._result=ReturnSuccess def restore(self): - restore = [Config.plugin.path+"/sample3Plugin/plugin", "--task", "restore"] + restore = [self._path+"/plugin", "--task", "restore"] proc = subprocess.Popen(restore, stdout=subprocess.PIPE) (out, err) = proc.communicate() out = out.strip() @@ -71,7 +71,7 @@ class Sample3Plugin(Plugin): self._result=ReturnSuccess def diagnose(self): - diagnose = [Config.plugin.path+"/sample3Plugin/plugin", "--task", "diagnose"] + diagnose = [self._path+"/plugin", "--task", "diagnose"] proc = subprocess.Popen(diagnose, stdout=subprocess.PIPE) (out, err) = proc.communicate() out = out.strip() @@ -81,7 +81,7 @@ class Sample3Plugin(Plugin): self._result=ReturnSuccess def fix(self): - fix = [Config.plugin.path+"/sample3Plugin/plugin", "--task", "fix"] + fix = [self._path+"/plugin", "--task", "fix"] proc = subprocess.Popen(fix, stdout=subprocess.PIPE) (out, err) = proc.communicate() out = out.strip() |