diff options
author | Adrian Likins <alikins@redhat.com> | 2008-07-15 18:16:18 -0400 |
---|---|---|
committer | Adrian Likins <alikins@redhat.com> | 2008-07-15 18:16:18 -0400 |
commit | 139d9ab8bc7deae4c1167bc5da1ffb478c433037 (patch) | |
tree | 7136b3e3b37c363db3cc7cd2dda0b28fe36920b6 /scripts | |
parent | 6e2adcd8271bbdccac72919b1c1a7be93a8aa83b (diff) | |
download | func-139d9ab8bc7deae4c1167bc5da1ffb478c433037.tar.gz func-139d9ab8bc7deae4c1167bc5da1ffb478c433037.tar.xz func-139d9ab8bc7deae4c1167bc5da1ffb478c433037.zip |
Change parameter passing... we need to call it with a list of paramaters, though the code will understand
how to deal with a single item being passed.
Also changed the method call to pass it as an arg list to the method (aka, method(*parameters))
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/func-transmit | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/func-transmit b/scripts/func-transmit index 1a0e670..e43714f 100644 --- a/scripts/func-transmit +++ b/scripts/func-transmit @@ -41,6 +41,7 @@ import func.overlord.client as fc input = sys.stdin.read() params = yaml.load(input).next() + # scan arguments clients = params.get('clients', "*") @@ -60,12 +61,16 @@ else: module = params.get('module','unknown') parameters = params.get('parameters', None) + # make the call client = fc.Overlord(clients, async=async, nforks=nforks) module_handle = getattr(client, module) method_handle = getattr(module_handle, method) if parameters is not None: - results = method_handle(parameters) + # listify if we get something thats not a list + if type(parameters) not in [type([]), type(())]: + parameters = [parameters] + results = method_handle(*parameters) else: results = method_handle() |