mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-12-20 03:20:19 +00:00
added function to retrieve the current state
This commit is contained in:
parent
1c32668e18
commit
2f0f18a8c6
1 changed files with 8 additions and 1 deletions
|
@ -112,6 +112,13 @@ class StateMachine(object):
|
||||||
self.transition(self.__current_state, self._default_state)
|
self.transition(self.__current_state, self._default_state)
|
||||||
|
|
||||||
|
|
||||||
|
def current_state(self):
|
||||||
|
'''
|
||||||
|
Return the current state name.
|
||||||
|
'''
|
||||||
|
return self.__current_state
|
||||||
|
|
||||||
|
|
||||||
def __getitem__(self, state):
|
def __getitem__(self, state):
|
||||||
'''
|
'''
|
||||||
Non-blocking, non-synchronized test to determine if we are in the given state.
|
Non-blocking, non-synchronized test to determine if we are in the given state.
|
||||||
|
|
Loading…
Reference in a new issue