'Executes the "actionban" command.
Replaces the tags in the action command with actions properties
and ban information, and executes the resulting command.
Parameters
aInfo : dict
Dictionary which includes information in relation to
the ban.'

def ban(self, aInfo):

    if self._startOnDemand:
        family = aInfo.get('family')
        if (not self.__started.get(family)):
            self.start(family)
            self.__started[family] = 1
            cmd = self._getOperation('<actionstart>', family)
            for f in CommandAction.COND_FAMILIES:
                if ((f != family) and (not self.__started.get(f))):
                    if (cmd == self._getOperation('<actionstart>', f)):
                        self.__started[f] = (-1)
    if (not self._processCmd('<actionban>', aInfo)):
        raise RuntimeError(('Error    banning    %(ip)s' % aInfo))
