Don't `yield` on non generator functions. Fixes #3908.
Don't `yield` on non generator functions. Fixes #3908.

Additionally, simplified match logic, replaced 3*`==` by `in`.

saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt