From 139d9ab8bc7deae4c1167bc5da1ffb478c433037 Mon Sep 17 00:00:00 2001 From: Adrian Likins Date: Tue, 15 Jul 2008 18:16:18 -0400 Subject: 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)) --- scripts/func-transmit | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts') 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() -- cgit