zeroconf: do not try to encode encoded strings (issue1942)
authorHenrik Stuart <hg@hstuart.dk>
Sat, 06 Feb 2010 17:31:54 +0100
changeset 10343 b8e3aeb7542c
parent 10342 579aae5aa549
child 10344 9501cde4c034
zeroconf: do not try to encode encoded strings (issue1942)
hgext/zeroconf/Zeroconf.py
--- a/hgext/zeroconf/Zeroconf.py	Sat Feb 06 17:31:49 2010 +0100
+++ b/hgext/zeroconf/Zeroconf.py	Sat Feb 06 17:31:54 2010 +0100
@@ -1060,16 +1060,16 @@
 			for key in properties:
 				value = properties[key]
 				if value is None:
-					suffix = ''.encode('utf-8')
+					suffix = ''
 				elif isinstance(value, str):
-					suffix = value.encode('utf-8')
+					suffix = value
 				elif isinstance(value, int):
 					if value:
 						suffix = 'true'
 					else:
 						suffix = 'false'
 				else:
-					suffix = ''.encode('utf-8')
+					suffix = ''
 				list.append('='.join((key, suffix)))
 			for item in list:
 				result = ''.join((result, struct.pack('!c', chr(len(item))), item))