Skip to content
Snippets Groups Projects
Commit 0f82b29f7494 authored by Kim Alvefur's avatar Kim Alvefur
Browse files

zeroconf: fix traceback under py3

hg serve under py3 caused
struct.error: char format requires a bytes object of length 1

<pulkit25> ah, I think that should be `pycompat.bytechr` instead of chr
parent 53607fd3ec6c
No related branches found
No related tags found
No related merge requests found
......@@ -1191,7 +1191,11 @@
list.append(b'='.join((key, suffix)))
for item in list:
result = b''.join(
(result, struct.pack(b'!c', chr(len(item))), item)
(
result,
struct.pack(b'!c', pycompat.bytechr(len(item))),
item,
)
)
self.text = result
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment