From b4b771c5aced0739eb7a875bf126d21dbdaff06b Mon Sep 17 00:00:00 2001 From: Adrian Likins Date: Fri, 12 Oct 2007 14:33:28 -0400 Subject: 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 --- func/overlord/cmd_modules/copyfile.py | 3 --- func/overlord/command.py | 8 +++++--- func/overlord/func_command.py | 4 +++- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'func') 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): -- cgit