예제 #1
0
 def add_state(self, key, state=None):
     """Add state"""
     if not key in self._states:
         if not state:
             state = get_void_state()
         self._states[key] = state
     else:
         raise Exception(str(key) + " is already a state.")
예제 #2
0
 def add_state(self, key, state=None):
     """Add state"""
     if not key in self._states:
         if not state:
             state = get_void_state()
         self._states[key] = state
     else:
         raise Exception(str(key) + " is already a state.")