Update state.py

https://github.com/saltstack/salt/issues/7991
Update state.py

https://github.com/saltstack/salt/pull/7992#issuecomment-26747276
Merge pull request #7992 from puluto/develop

Update state.py