def _GetNewestPuppetSslCert(self):
    """Harvests the newest Puppet SSL cert in the public certs directory.

    This directory is world readable so no increased privileges will be
    required.

    Returns:
      str newest cert filename, or None if none were found.
    """
    newest_cert = None
    newest_cert_timestamp = None
    certs_path = os.path.join(self.CLIENT_SSL_PATH, self.PUPPET_CERTS)
    certs = os.listdir(certs_path)
    logging.debug(
        '_GetNewestPuppetSslCert found certs %s', ' '.join(certs))
    for cert_fname in certs:
      if cert_fname != self.PUPPET_CA_CERT and cert_fname.endswith('.pem'):
        try:
          self._ValidatePuppetSslCert(certs_path, cert_fname)
        except PuppetSslCertError:
          continue

        cert_timestamp = os.path.getmtime(os.path.join(certs_path, cert_fname))
        if not newest_cert_timestamp or newest_cert_timestamp > cert_timestamp:
          logging.debug(
              '_GetPuppetSslDetails found cert %s with timestamp %s',
              cert_fname, cert_timestamp)
          newest_cert_timestamp = cert_timestamp
          newest_cert = cert_fname
        else:
          logging.debug(
              '_GetPuppetSslDetails skipping cert %s with older timestamp %s',
              cert_fname, cert_timestamp)
        # don't break here; need to exhaustively check the dir for newest cert.
    return newest_cert
dataset/ETHPy150Open google/simian/src/simian/client/client.py/HttpsAuthClient._GetNewestPuppetSslCert/swapped operands of `>`