summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
authorThom Nichols <tmnichols@gmail.com>2010-06-03 08:07:56 -0400
committerThom Nichols <tmnichols@gmail.com>2010-06-03 08:07:56 -0400
commit2f0f18a8c62db21fa3ba8cc87a6d190aca205c30 (patch)
treeb7d7d275394de1300743bce515eb779dd228eeb5 /sleekxmpp/xmlstream
parent1c32668e18c0cbf840694c66a6f724b2d3cb8f29 (diff)
downloadslixmpp-2f0f18a8c62db21fa3ba8cc87a6d190aca205c30.tar.gz
slixmpp-2f0f18a8c62db21fa3ba8cc87a6d190aca205c30.tar.bz2
slixmpp-2f0f18a8c62db21fa3ba8cc87a6d190aca205c30.tar.xz
slixmpp-2f0f18a8c62db21fa3ba8cc87a6d190aca205c30.zip
added function to retrieve the current state
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/statemachine.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/statemachine.py b/sleekxmpp/xmlstream/statemachine.py
index c5f51765..065d5794 100644
--- a/sleekxmpp/xmlstream/statemachine.py
+++ b/sleekxmpp/xmlstream/statemachine.py
@@ -110,7 +110,14 @@ class StateMachine(object):
def reset(self):
# TODO need to lock before calling this?
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):
'''