Ignore known salt internal arguments.

This commit is contained in:
Pedro Algarvio 2013-11-02 21:38:55 +00:00
parent 56cb07fab4
commit 94e1825bd9

View File

@ -10,6 +10,7 @@ import shlex
# Import salt libs
import salt.utils
from salt.state import STATE_INTERNAL_KEYWORDS as _STATE_INTERNAL_KEYWORDS
from salt.exceptions import SaltException
@ -81,7 +82,7 @@ def build_rule(table=None, chain=None, command=None, position='', full=None,
kwargs['jump'] = kwargs['target']
del kwargs['target']
for ignore in ('__id__', 'fun', 'table', 'chain', '__env__', '__sls__', 'order', 'save'):
for ignore in list(_STATE_INTERNAL_KEYWORDS) + ['chain', 'save', 'table']:
if ignore in kwargs:
del kwargs[ignore]