Skip to content

Commit 4badf8a

Browse files
committed
Backport url type-check fix from #2628 to 8.0.1
1 parent 107e57c commit 4badf8a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sopel/builtins/url.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,10 @@ def process_urls(
437437
except ValueError:
438438
# Extra try/except here in case the DNS resolution fails, see #2348
439439
try:
440-
ips = [ip_address(ip) for ip in dns.resolver.resolve(parsed_url.hostname)]
440+
ips = [
441+
ip_address(ip.to_text())
442+
for ip in dns.resolver.resolve(parsed_url.hostname)
443+
]
441444
except Exception as exc:
442445
LOGGER.debug(
443446
"Cannot resolve hostname %s, ignoring URL %s"

0 commit comments

Comments
 (0)