daemon: Fix support for multiple session state hooks.
This commit is contained in:
parent
c37627b67a
commit
e24bc9f3b9
1 changed files with 1 additions and 1 deletions
|
@ -312,7 +312,7 @@ class Session(object):
|
||||||
if state not in self._hooks:
|
if state not in self._hooks:
|
||||||
self._hooks[state] = [hook,]
|
self._hooks[state] = [hook,]
|
||||||
else:
|
else:
|
||||||
self._hooks[state] += hook
|
self._hooks[state].append(hook)
|
||||||
# immediately run a hook if it is in the current state
|
# immediately run a hook if it is in the current state
|
||||||
# (this allows hooks in the definition and configuration states)
|
# (this allows hooks in the definition and configuration states)
|
||||||
if self.getstate() == state:
|
if self.getstate() == state:
|
||||||
|
|
Loading…
Add table
Reference in a new issue