summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Likins <alikins@grimlock.devel.redhat.com>2007-10-09 15:09:52 -0400
committerAdrian Likins <alikins@grimlock.devel.redhat.com>2007-10-09 15:09:52 -0400
commit45c032a1db94a709ec66995d3e9841630f46e3aa (patch)
treec6e9fcd5b779083caddee454e2720632a76e1f3b
parent4df50c15698414d6c423262c764302f3f5f1f225 (diff)
downloadfunc-45c032a1db94a709ec66995d3e9841630f46e3aa.tar.gz
func-45c032a1db94a709ec66995d3e9841630f46e3aa.tar.xz
func-45c032a1db94a709ec66995d3e9841630f46e3aa.zip
add a hook into command.py to do stuff to the arguments before
command.py tries to dig into them itself. We will use this to get the "hostnamegoo" out before looking for subcommands.
-rw-r--r--func/overlord/command.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/func/overlord/command.py b/func/overlord/command.py
index 812ad8d..9c53ea7 100644
--- a/func/overlord/command.py
+++ b/func/overlord/command.py
@@ -227,6 +227,10 @@ 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:
command = args[0]
@@ -265,6 +269,12 @@ class Command:
"""
pass
+ def handleArguments(self, arguments):
+ """
+ Handle the parsed arguments.
+ """
+ pass
+
def getRootCommand(self):
"""
Return the top-level command, which is typically the program.