summaryrefslogtreecommitdiffstats
path: root/func
diff options
context:
space:
mode:
authorAdrian Likins <alikins@grimlock.devel.redhat.com>2007-10-12 14:33:28 -0400
committerAdrian Likins <alikins@grimlock.devel.redhat.com>2007-10-12 14:33:28 -0400
commitb4b771c5aced0739eb7a875bf126d21dbdaff06b (patch)
tree7394a791d31e98b79f3be121976f90c9cdf59701 /func
parent7e20169c94df803759acb82f6813dc1a297b9fde (diff)
downloadthird_party-func-b4b771c5aced0739eb7a875bf126d21dbdaff06b.tar.gz
third_party-func-b4b771c5aced0739eb7a875bf126d21dbdaff06b.tar.xz
third_party-func-b4b771c5aced0739eb7a875bf126d21dbdaff06b.zip
copyfile.py: dont need the parse call here
command.py: move the parse args stuff to before we call subcommands func_command.py: include the copyfile classes so we can use them
Diffstat (limited to 'func')
-rw-r--r--func/overlord/cmd_modules/copyfile.py3
-rw-r--r--func/overlord/command.py8
-rw-r--r--func/overlord/func_command.py4
3 files changed, 8 insertions, 7 deletions
diff --git a/func/overlord/cmd_modules/copyfile.py b/func/overlord/cmd_modules/copyfile.py
index 3206a4e..9a6f54d 100644
--- a/func/overlord/cmd_modules/copyfile.py
+++ b/func/overlord/cmd_modules/copyfile.py
@@ -47,9 +47,6 @@ class CopyFile(client.command.Command):
if self.options.port:
self.port = self.options.port
- def parse(self, argv):
- self.argv = argv
- return command.Command.parse(self,argv)
def do(self, args):
self.server_spec = self.parentCommand.server_spec
diff --git a/func/overlord/command.py b/func/overlord/command.py
index 9c53ea7..7fb7de4 100644
--- a/func/overlord/command.py
+++ b/func/overlord/command.py
@@ -217,6 +217,11 @@ class Command:
# command
args = [args[1], args[0]]
+
+ # if we have args that we need to deal with, do it now
+ # before we start looking for subcommands
+ self.handleArguments(args)
+
# if we don't have subcommands, defer to our do() method
if not self.subCommands:
ret = self.do(args)
@@ -227,9 +232,6 @@ class Command:
return ret
- # if we have args that we need to deal with, do it now
- # before we start looking for subcommands
- self.handleArguments(args)
# if we do have subcommands, defer to them
try:
diff --git a/func/overlord/func_command.py b/func/overlord/func_command.py
index 2210334..87c3e09 100644
--- a/func/overlord/func_command.py
+++ b/func/overlord/func_command.py
@@ -9,6 +9,7 @@ import command
#FIXME: need a plug-in runtime module loader here
from cmd_modules import call
from cmd_modules import show
+from cmd_modules import copyfile
from func.overlord import client
@@ -16,7 +17,8 @@ class FuncCommandLine(command.Command):
name = "client"
useage = "func is the commandline interface to a func minion"
- subCommandClasses = [call.Call,show.Show]
+ subCommandClasses = [call.Call, show.Show,
+ copyfile.CopyFile]
def __init__(self):