Update state.py

https://github.com/saltstack/salt/issues/7991