Skip to content
Browse files

Merge branch 'hacks' of git@github.com:tomstrummer/SleekXMPP into hacks

  • Loading branch information...
2 parents 15ac3e9 + bf2bf29 commit 8bdfa770245ec02efbecf81bc598faa2b66a64f4 @thom-nic thom-nic committed Jun 28, 2010
Showing with 5 additions and 5 deletions.
  1. +5 −5 sleekxmpp/xmlstream/statemachine.py
View
10 sleekxmpp/xmlstream/statemachine.py
@@ -97,7 +97,7 @@ def transition_any(self, from_states, to_state, wait=0.0, func=None, args=[], kw
logging.debug(' ==== TRANSITION %s -> %s', self.__current_state, to_state)
self.__current_state = to_state
- self.lock.notifyAll()
+ self.lock.notify_all()
return return_val # some 'true' value returned by func or True if func was None
else:
logging.error( "StateMachine bug!! The lock should ensure this doesn't happen!" )
@@ -126,13 +126,13 @@ def transition_ctx(self, from_state, to_state, wait=0.0):
The other main difference between this method and `transition()` is that the
- state machine is locked for the duration of the `with` statement (normally,
- after a `transition() occurs, the state machine is immediately unlocked and
+ state machine is locked for the duration of the `with` statement. Normally,
+ after a `transition()` occurs, the state machine is immediately unlocked and
available to another thread to call `transition()` again.
'''
if not from_state in self.__states:
- raise ValueError( "StateMachine does not contain from_state %s." % state )
+ raise ValueError( "StateMachine does not contain from_state %s." % from_state )
if not to_state in self.__states:
raise ValueError( "StateMachine does not contain to_state %s." % to_state )
@@ -228,7 +228,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):
self.state_machine.current_state(), self.to_state)
self.state_machine._set_state( self.to_state )
- self.state_machine.lock.notifyAll()
+ self.state_machine.lock.notify_all()
self.state_machine.lock.release()
return False # re-raise any exception

0 comments on commit 8bdfa77

Please sign in to comment.
Something went wrong with that request. Please try again.