Fix stacktrace for non-existant states

Closes #25813
This commit is contained in:
Mike Place 2015-07-31 11:09:26 -06:00 committed by rallytime
parent ccbba8656b
commit 17e1ddf137

View file

@ -610,7 +610,10 @@ class State(object):
mod_init function in the state module.
'''
# ensure that the module is loaded
self.states['{0}.{1}'.format(low['state'], low['fun'])] # pylint: disable=W0106
try:
self.states['{0}.{1}'.format(low['state'], low['fun'])] # pylint: disable=W0106
except KeyError:
return
minit = '{0}.mod_init'.format(low['state'])
if low['state'] not in self.mod_init:
if minit in self.states._dict: