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
--- a/hgext/zeroconf/Zeroconf.py Sun Nov 17 19:55:01 2019 +0100
+++ b/hgext/zeroconf/Zeroconf.py Wed Nov 13 22:40:32 2019 +0100
@@ -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: