Example #1
0
  def _removeConditions(self, all):
    '''
    Removes registered conditions. All of them if all is True or only one-shot
    conditions if all is False.

    @param all: Remove all conditions (True) or just one-shot conditions
      (False)?
    @type all: boolean
    '''
    for cond, survive in self.conditions.items():
      if not survive or all:
        try:
          EventManager.removeCondition(cond)
          del self.conditions[cond]
        except ValueError:
          pass