summaryrefslogtreecommitdiffstats
path: root/func/overlord/command.py
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 /func/overlord/command.py
parent4df50c15698414d6c423262c764302f3f5f1f225 (diff)
downloadthird_party-func-45c032a1db94a709ec66995d3e9841630f46e3aa.tar.gz
third_party-func-45c032a1db94a709ec66995d3e9841630f46e3aa.tar.xz
third_party-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.
Diffstat (limited to 'func/overlord/command.py')
-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.