def get_cname(self, domain):
        """
        :param domain: Domain name to look up a CNAME for.
        :return: First CNAME target or False if no CNAME record exists.
        """
        try:
            result = dns.resolver.query(domain, 'CNAME')
            if len(result) > 0:
                return str(result[0].target).rstrip('.')
        except dns.exception.DNSException:
            return False

        :param domain: Domain name to look up a CNAME for.
        :return: First CNAME target or False if no CNAME record exists.
        
lemur/plugins/lemur_acme/acme_handlers.py