fixed socket name collision in xmlstream.py and fixed python 3.x compatibility

This commit is contained in:
Nathan Fritz
2010-10-14 10:58:07 -07:00
parent a41a4369c6
commit 0d0b963fe5
6 changed files with 19 additions and 16 deletions

View File

@@ -268,11 +268,11 @@ class _StateCtx:
if __name__ == '__main__':
def callback(s, s2):
print 1, s.transition('on', 'off', wait=0.0, func=callback, args=[s,s2])
print 2, s2.transition('off', 'on', func=callback, args=[s,s2])
print((1, s.transition('on', 'off', wait=0.0, func=callback, args=[s,s2])))
print((2, s2.transition('off', 'on', func=callback, args=[s,s2])))
return True
s = StateMachine(('off', 'on'))
s2 = StateMachine(('off', 'on'))
print 3, s.transition('off', 'on', wait=0.0, func=callback, args=[s,s2]),
print s.current_state(), s2.current_state()
print((3, s.transition('off', 'on', wait=0.0, func=callback, args=[s,s2]),))
print((s.current_state(), s2.current_state()))