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
b9377420
Commit
b9377420
authored
Sep 01, 2018
by
tengattack
Committed by
GitHub
Sep 01, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3 from huww98/master
Fix error while add_txt_record.
parents
31cc460c
ec489e40
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
certbot_dns_dnspod/dns_dnspod.py
certbot_dns_dnspod/dns_dnspod.py
+8
-7
setup.py
setup.py
+0
-1
No files found.
certbot_dns_dnspod/dns_dnspod.py
View file @
b9377420
...
@@ -3,7 +3,6 @@ import logging
...
@@ -3,7 +3,6 @@ import logging
import
zope.interface
import
zope.interface
from
lexicon.providers
import
dnspod
from
lexicon.providers
import
dnspod
from
tld
import
get_tld
from
certbot
import
errors
from
certbot
import
errors
from
certbot
import
interfaces
from
certbot
import
interfaces
...
@@ -51,12 +50,10 @@ class Authenticator(dns_common.DNSAuthenticator):
...
@@ -51,12 +50,10 @@ class Authenticator(dns_common.DNSAuthenticator):
)
)
def
_perform
(
self
,
domain
,
validation_name
,
validation
):
def
_perform
(
self
,
domain
,
validation_name
,
validation
):
tld_domain
=
get_tld
(
domain
,
fix_protocol
=
True
)
self
.
_get_dnspod_client
()
.
add_txt_record
(
domain
,
validation_name
,
validation
)
self
.
_get_dnspod_client
()
.
add_txt_record
(
tld_domain
,
validation_name
,
validation
)
def
_cleanup
(
self
,
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
(
domain
,
validation_name
,
validation
)
self
.
_get_dnspod_client
()
.
del_txt_record
(
tld_domain
,
validation_name
,
validation
)
def
_get_dnspod_client
(
self
):
def
_get_dnspod_client
(
self
):
return
_DNSPodLexiconClient
(
self
.
credentials
.
conf
(
'api-id'
),
return
_DNSPodLexiconClient
(
self
.
credentials
.
conf
(
'api-id'
),
...
@@ -82,6 +79,10 @@ class _DNSPodLexiconClient(dns_common_lexicon.LexiconClient):
...
@@ -82,6 +79,10 @@ class _DNSPodLexiconClient(dns_common_lexicon.LexiconClient):
hint
=
None
hint
=
None
if
str
(
e
)
.
startswith
(
'400 Client Error:'
):
if
str
(
e
)
.
startswith
(
'400 Client Error:'
):
hint
=
'Are your API ID and API Token values correct?'
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
''
))
.
format
(
domain_name
,
e
,
' ({0})'
.
format
(
hint
)
if
hint
else
''
))
def
_handle_general_error
(
self
,
e
,
domain_name
):
if
not
str
(
e
)
.
startswith
(
'Domain name invalid'
):
return
errors
.
PluginError
(
'Unexpected error determining zone identifier for {0}: {1}'
.
format
(
domain_name
,
e
))
setup.py
View file @
b9377420
...
@@ -14,7 +14,6 @@ install_requires = [
...
@@ -14,7 +14,6 @@ install_requires = [
'dns-lexicon'
,
'dns-lexicon'
,
'mock'
,
'mock'
,
'setuptools'
,
'setuptools'
,
'tld'
,
'zope.interface'
,
'zope.interface'
,
]
]
...
...
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