Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
certbot-dnspod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
certbot-dnspod
Commits
ce664424
Commit
ce664424
authored
Aug 31, 2018
by
胡玮文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix error.
parent
31cc460c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
certbot_dns_dnspod/dns_dnspod.py
certbot_dns_dnspod/dns_dnspod.py
+3
-7
No files found.
certbot_dns_dnspod/dns_dnspod.py
View file @
ce664424
...
...
@@ -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
''
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment