Skip to content
Browse files

parent fsm doesn't use children states unless needed + added thread n…

…ame in test + removed pdb
  • Loading branch information...
1 parent e4333f1 commit 4c2b62a863ef2ad73721d31d5e4aa876610aa36b @Dfred committed Mar 21, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 utils/parallel_fsm.py
View
4 utils/parallel_fsm.py
@@ -238,8 +238,9 @@ def run(self, callback=None):
"""
self._ready_machines()
machines = [self]+self.machines
+# import pdb; pdb.set_trace()
while self._state != STOPPED:
- if self._step( [m._state for m in machines] ) == False:
+ if self._step( [self._state] ) == False:
self._wait_active_states(machines)
callback and callback()
self.abort()
@@ -261,6 +262,7 @@ def abort(self):
import time, sys
if len(sys.argv) > 1 and sys.argv[1] == '-d':
from utils import LOGFORMATINFO
+ LOGFORMATINFO['format'] = '[%(threadName)s] '+LOGFORMATINFO['format']
logging.basicConfig(level=logging.DEBUG, **LOGFORMATINFO)
else:
print "use -d for debug"

0 comments on commit 4c2b62a

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