Skip to content
Merged
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
3 changes: 2 additions & 1 deletion src/zeroconf/_utils/ipaddress.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ def ip_bytes_and_scope_to_address(address: bytes_, scope: int_) -> Optional[Unio
"""Convert the bytes and scope to an IP address object."""
base_address = cached_ip_addresses_wrapper(address)
if base_address is not None and base_address.is_link_local:
return cached_ip_addresses_wrapper(f"{base_address}%{scope}")
# Avoid expensive __format__ call by using PyUnicode_Join
return cached_ip_addresses_wrapper("".join((str(base_address), "%", str(scope))))
return base_address


Expand Down