Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion certbot_dns_duckdns/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Certbot plugin for DNS-01 challenge using DuckDNS."""

__version__ = "v1.7.0"
__version__ = "v1.7.1"
16 changes: 9 additions & 7 deletions certbot_dns_duckdns/cert/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,17 @@ def _perform(self, domain: str, validation_name: str, validation: str) -> None:
txt_values = custom_resolver.resolve(duckdns_domain, "TXT")
else:
txt_values = custom_resolver.query(duckdns_domain, "TXT")
except Exception as e:
raise errors.PluginError(e)

# there should only be one single TXT record
if len(txt_values) != 1:
raise errors.PluginError("issue resoling TXT record")
# there should only be one single TXT record
if len(txt_values) != 1:
raise errors.PluginError("issue resoling TXT record")

# remove the additional quotes around the TXT value
self._old_txt_value = txt_values[0].to_text()[1:-1]
# remove the additional quotes around the TXT value
self._old_txt_value = txt_values[0].to_text()[1:-1]
except dns.resolver.NoAnswer:
self._old_txt_value = ""
except Exception as e:
raise errors.PluginError(e)

try:
self._get_duckdns_client().set_txt_record(duckdns_domain, validation)
Expand Down