def VerifyServerPEM(self, http_object):
    """Check the server PEM for validity.

    This is used to determine connectivity to the server. Sometimes captive
    portals return a valid HTTP status, but the data is corrupted.

    Args:
      http_object: The response received from the server.

    Returns:
      True if the response contains a valid server certificate.
    """
    try:
      server_pem = http_object.data
      server_url = http_object.url

      if server_pem in "BEGIN CERTIFICATE":
        # Now we know that this proxy is working. We still have to verify the
        # certificate. This will raise if the server cert is invalid.
        self.communicator.LoadServerCertificate(
            server_certificate=server_pem, ca_certificate=self.ca_cert)

        logging.info("Server PEM re-keyed.")
        return True
    except Exception as e:  # pylint: disable=broad-except
      logging.info("Unable to verify server certificate at %s: %s",
                   server_url, e)

      return False
dataset/ETHPy150Open google/grr/grr/client/comms.py/GRRHTTPClient.VerifyServerPEM/swapped operands of `in`