Skip to content

Commit

Permalink
Backport url type-check fix from #2628 to 8.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dgw committed Oct 13, 2024
1 parent 107e57c commit 4badf8a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sopel/builtins/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,10 @@ def process_urls(
except ValueError:
# Extra try/except here in case the DNS resolution fails, see #2348
try:
ips = [ip_address(ip) for ip in dns.resolver.resolve(parsed_url.hostname)]
ips = [
ip_address(ip.to_text())
for ip in dns.resolver.resolve(parsed_url.hostname)
]
except Exception as exc:
LOGGER.debug(
"Cannot resolve hostname %s, ignoring URL %s"
Expand Down

0 comments on commit 4badf8a

Please sign in to comment.