saltstack/salt — pull request #4518 by tweeklab (2013-04-16 22:09:54+00:00)
Title: Fix off-by-one error in module.run state function setting default arg values

While iterating the list of arguments to fill in the default values, module.run stops too soon because the range() stops at 0 and not -1. As a result, the following would fail:

The function:

```python
def func(arg='default_value'):
print arg
```
The state:

```yaml
test:
module.run:
- name: func
```

It would fail saying that 'arg' was missing even though there is a default value.

I found this while testing my code for #4511, but is a completely separate change.