changeset 10343:b8e3aeb7542c

zeroconf: do not try to encode encoded strings (issue1942)
author Henrik Stuart <hg@hstuart.dk>
date Sat, 06 Feb 2010 17:31:54 +0100
parents 579aae5aa549
children 9501cde4c034
files hgext/zeroconf/Zeroconf.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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))