def METHOD_NAME(self):
    try:
        # Auto-map the protocol field by looking at the URL
        protocol = urlparse(self.url).scheme
        self.protocol = MirrorProtocol.objects.get(protocol=protocol)
    except Exception as e:
        raise ValidationError(e)
    try:
        families = self.address_families()
        self.has_ipv4 = socket.AF_INET in families
        self.has_ipv6 = socket.AF_INET6 in families
    except socket.error:
        # We don't fail in this case; we'll just set both to False
        self.has_ipv4 = False
        self.has_ipv6 = False