From ce664424091730ad93bc92bbd6a209e3ae03622a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E7=8E=AE=E6=96=87?= Date: Fri, 31 Aug 2018 16:40:48 +0800 Subject: [PATCH] fix error. --- certbot_dns_dnspod/dns_dnspod.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/certbot_dns_dnspod/dns_dnspod.py b/certbot_dns_dnspod/dns_dnspod.py index 771a35f..8f9271b 100644 --- a/certbot_dns_dnspod/dns_dnspod.py +++ b/certbot_dns_dnspod/dns_dnspod.py @@ -3,7 +3,6 @@ import logging import zope.interface from lexicon.providers import dnspod -from tld import get_tld from certbot import errors from certbot import interfaces @@ -51,12 +50,10 @@ class Authenticator(dns_common.DNSAuthenticator): ) def _perform(self, domain, validation_name, validation): - tld_domain = get_tld(domain, fix_protocol=True) - self._get_dnspod_client().add_txt_record(tld_domain, validation_name, validation) + self._get_dnspod_client().add_txt_record(domain, validation_name, validation) def _cleanup(self, domain, validation_name, validation): - tld_domain = get_tld(domain, fix_protocol=True) - self._get_dnspod_client().del_txt_record(tld_domain, validation_name, validation) + self._get_dnspod_client().del_txt_record(domain, validation_name, validation) def _get_dnspod_client(self): return _DNSPodLexiconClient(self.credentials.conf('api-id'), @@ -82,6 +79,5 @@ class _DNSPodLexiconClient(dns_common_lexicon.LexiconClient): hint = None if str(e).startswith('400 Client Error:'): hint = 'Are your API ID and API Token values correct?' - - return errors.PluginError('Error determining zone identifier for {0}: {1}.{2}' + return errors.PluginError('Error determining zone identifier for {0}: {1}.{2}' .format(domain_name, e, ' ({0})'.format(hint) if hint else ''))