'Check to see if a port range exists in the allowed field.'

def _port_range_exists(self, allowed_list, error_cat='ALLOWED'):

    errors = []
    for allowed in allowed_list:
        ports = allowed.get('ports', None)
        if ports:
            for port in ports:
                if (str(port).find('-') > (-1)):
                    ae = make_audit_issue(error_cat, 'EXISTS', 'PORTRANGE')
                    ae.notes = ('%s:%s' % (allowed['IPProtocol'], port))
                    errors.append(ae)
    return errors
