saltstack/salt — pull request #8578 by heewa (2013-11-15 23:34:00+00:00)
Title: Verify pillar from master on minion.

In some cases, it's possible for minion to get an invalid pillar from master,
through a mostly valid reply. Check that at least it's a dict, otherwise later
code tries to do lookups in it and fails confusingly:

```
[CRITICAL] Failed to load grains defined in grain file opts.opts in function , error:
Traceback (most recent call last):
File "/var/pip_from_repo/src/salt-minion/salt/loader.py", line 929, in gen_grains
ret = fun()
File "/var/pip_from_repo/src/salt-minion/salt/grains/opts.py", line 12, in opts
if __opts__.get('grain_opts', False) or __pillar__.get('grain_opts', False):
AttributeError: 'bool' object has no attribute 'get'
```

turns to:

```
[ERROR ] Got a bad pillar from master, type bool, expecting dict: False
```