'Removes banned IP calling actions\' unban method
Remove a banned IP now, rather than waiting for it to expire,
even if set to never expire.
Parameters
ip : str or IPAddr or None
The IP address to unban or all IPs if None
Raises
ValueError
If `ip` is not banned'

def removeBannedIP(self, ip=None, db=True, ifexists=False):

    if (ip is None):
        return self.__flushBan(db)
    if (db and (self._jail.database is not None)):
        self._jail.database.delBan(self._jail, ip)
    ticket = self.__banManager.getTicketByID(ip)
    if (ticket is not None):
        self.__unBan(ticket)
    else:
        if ifexists:
            return 0
        raise ValueError(('%s    is    not    banned' % ip))
    return 1
