daemon: Fix support for multiple session state hooks.

This commit is contained in:
Tom Goff 2015-09-21 12:36:51 -04:00
parent c37627b67a
commit e24bc9f3b9

View file

@ -312,7 +312,7 @@ class Session(object):
if state not in self._hooks:
self._hooks[state] = [hook,]
else:
self._hooks[state] += hook
self._hooks[state].append(hook)
# immediately run a hook if it is in the current state
# (this allows hooks in the definition and configuration states)
if self.getstate() == state: