mercurial/crew
changeset 10343:b8e3aeb7542c
zeroconf: do not try to encode encoded strings (issue1942)
| author | Henrik Stuart <hg@hstuart.dk> |
|---|---|
| date | Sat Feb 06 17:31:54 2010 +0100 (5 months ago) |
| parents | 579aae5aa549 |
| children | 9501cde4c034 |
| files | hgext/zeroconf/Zeroconf.py |
line diff
1.1 --- a/hgext/zeroconf/Zeroconf.py 1.2 +++ b/hgext/zeroconf/Zeroconf.py 1.3 @@ -1060,16 +1060,16 @@ 1.4 for key in properties: 1.5 value = properties[key] 1.6 if value is None: 1.7 - suffix = ''.encode('utf-8') 1.8 + suffix = '' 1.9 elif isinstance(value, str): 1.10 - suffix = value.encode('utf-8') 1.11 + suffix = value 1.12 elif isinstance(value, int): 1.13 if value: 1.14 suffix = 'true' 1.15 else: 1.16 suffix = 'false' 1.17 else: 1.18 - suffix = ''.encode('utf-8') 1.19 + suffix = '' 1.20 list.append('='.join((key, suffix))) 1.21 for item in list: 1.22 result = ''.join((result, struct.pack('!c', chr(len(item))), item))
