Skip to content

Free 'fun' from the function signature namespace - #26648

Merged
basepi merged 1 commit into
saltstack:developfrom
whiteinge:fix-shadowed-fun-arg
Aug 25, 2015
Merged

basepi merged 1 commit into
saltstack:developfrom
whiteinge:fix-shadowed-fun-arg

Conversation

@whiteinge

Copy link
Copy Markdown
Contributor

'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 "<console>", line 1, in <module>
TypeError: runner() got multiple values for keyword argument 'fun'

'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 "<console>", line 1, in <module>
TypeError: runner() got multiple values for keyword argument 'fun'
@jfindlay jfindlay added Execution-Module Core relates to code central or existential to Salt bugfix-bckport will be be back-ported to an older release branch by creating a PR against that branch Minor Change and removed bugfix-bckport will be be back-ported to an older release branch by creating a PR against that branch labels Aug 25, 2015
@jfindlay

Copy link
Copy Markdown
Contributor

@whiteinge, does this need to be backported?

basepi added a commit that referenced this pull request Aug 25, 2015
Free 'fun' from the function signature namespace
@basepi
basepi merged commit 809a47f into saltstack:develop Aug 25, 2015
@basepi basepi added the bugfix-bckport will be be back-ported to an older release branch by creating a PR against that branch label Aug 25, 2015
@basepi

basepi commented Aug 25, 2015

Copy link
Copy Markdown
Contributor

Backport to 2015.5 please

@whiteinge
whiteinge deleted the fix-shadowed-fun-arg branch August 26, 2015 17:08
@rallytime rallytime added Bugfix - [Done] back-ported and removed bugfix-bckport will be be back-ported to an older release branch by creating a PR against that branch labels Aug 26, 2015
basepi added a commit that referenced this pull request Aug 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Core relates to code central or existential to Salt Execution-Module Tests-Passed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants