saltstack/salt — pull request #991 by trane (2012-03-22 23:17:05+00:00)
Title: Add verification of top file (#345)

Checks completely built top file for invalid keys, such as `''`. This can be
expanded to check for other things that are not expected by salt.

Note:
This is only a prototype, feel free to reject and have me update more

This is the output from `salt-call -l debug state.highstate` the the `top.sls` file contains `''`:

```
salt-call -l debug state.highstate
[DEBUG ] Failed to import module json_mako, this is most likely NOT a problem: No module named mako.template
[DEBUG ] Failed to import module yaml_mako, this is most likely NOT a problem: No module named mako.template
[DEBUG ] Loaded minion key: /etc/salt/pki/minion.pem
[DEBUG ] Decrypting the current master AES key
[DEBUG ] Loaded minion key: /etc/salt/pki/minion.pem
[INFO ] Loading fresh modules for state activity
[DEBUG ] Failed to import module json_mako, this is most likely NOT a problem: No module named mako.template
[DEBUG ] Failed to import module yaml_mako, this is most likely NOT a problem: No module named mako.template
local:
----------
State: - no
Name: states
Function: None
Result: False
Comment: Invalid top syntax
Changes:

```