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
13 changes: 2 additions & 11 deletions src/zeroconf/_services/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,20 +361,11 @@ def _unpack_text_into_properties(self) -> None:
strs.append(text[index : index + length])
index += length

key: bytes
value: Optional[bytes]
for s in strs:
key_value = s.split(b'=', 1)
if len(key_value) == 2:
key, value = key_value
else:
# No equals sign at all
key = s
value = None

key, _, value = s.partition(b'=')
# Only update non-existent properties
if key and key not in result:
result[key] = value
result[key] = value or None

# Properties should be set atomically
# in case another thread is reading them
Expand Down