Commits

Anonymous committed 298c5dd

allowed arbitrary attributes to be set in the constructor

Comments (0)

Files changed (1)

     exit_action = None
     creation_counter = 0
 
-    def __init__(self, label=None, exits_to=None, entry_action=None, exit_action=None):
+    def __init__(self, label=None, exits_to=None, entry_action=None, exit_action=None, **kwargs):
         self.label = label
         self.exit_states = exits_to or []
         self.entry_action = entry_action
         self.exit_action = exit_action
+        for k, v in kwargs.items():
+            setattr(self, k, v)
+            
 
     def __unicode__(self):
         return self.name
         self.dbg = None
         self.verify_on_execute = verify_on_execute
 
+        for k, s in self.states.items():
+            if '*' in s.exit_states:
+                s.exit_states = [key for key in self.states.keys()]
+
     def __unicode__(self):
         return self.__state