From 1af42eed365918eb28c3fa5ec076dbfd5af978b4 Mon Sep 17 00:00:00 2001 From: Seth House Date: Tue, 25 Aug 2015 15:08:02 -0600 Subject: [PATCH] Free 'fun' from the function signature namespace 'fun' is a common argument in Salt. format_call will choke if you attempt to call a function that uses this argment. I.e.,: >>> __salt__.saltutil.runner('mine.get', tgt='*', fun='network.ip_addrs', tgt_type='glob') Traceback (most recent call last): File "", line 1, in TypeError: runner() got multiple values for keyword argument 'fun' --- salt/modules/saltutil.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/salt/modules/saltutil.py b/salt/modules/saltutil.py index 37f54d3af2..e96b9c0e95 100644 --- a/salt/modules/saltutil.py +++ b/salt/modules/saltutil.py @@ -795,7 +795,7 @@ def cmd_iter(tgt, yield ret -def runner(fun, **kwargs): +def runner(_fun, **kwargs): ''' Execute a runner module (this function must be run on the master) @@ -822,10 +822,10 @@ def runner(fun, **kwargs): else: rclient = salt.runner.RunnerClient(__opts__) - return rclient.cmd(fun, [], kwarg=kwargs) + return rclient.cmd(_fun, kwarg=kwargs) -def wheel(fun, **kwargs): +def wheel(_fun, **kwargs): ''' Execute a wheel module (this function must be run on the master) @@ -843,7 +843,7 @@ def wheel(fun, **kwargs): salt '*' saltutil.wheel key.accept match=jerry ''' wclient = salt.wheel.WheelClient(__opts__) - return wclient.cmd(fun, kwarg=kwargs) + return wclient.cmd(_fun, kwarg=kwargs) # this is the only way I could figure out how to get the REAL file_roots