don't fail zeroconf with non-ascii hostname

This commit is contained in:
Yann Leboulanger 2011-02-06 00:07:46 +01:00
parent e61f7aa4db
commit 8a03cfde96
1 changed files with 1 additions and 2 deletions

View File

@ -87,8 +87,7 @@ class ConnectionZeroconf(CommonConnection, ConnectionHandlersZeroconf):
'is_zeroconf', True) 'is_zeroconf', True)
gajim.config.set_per('accounts', gajim.ZEROCONF_ACC_NAME, gajim.config.set_per('accounts', gajim.ZEROCONF_ACC_NAME,
'use_ft_proxies', False) 'use_ft_proxies', False)
#XXX make sure host is US-ASCII self.host = unicode(socket.gethostname(), locale.getpreferredencoding())
self.host = unicode(socket.gethostname())
gajim.config.set_per('accounts', gajim.ZEROCONF_ACC_NAME, 'hostname', gajim.config.set_per('accounts', gajim.ZEROCONF_ACC_NAME, 'hostname',
self.host) self.host)
self.port = gajim.config.get_per('accounts', gajim.ZEROCONF_ACC_NAME, self.port = gajim.config.get_per('accounts', gajim.ZEROCONF_ACC_NAME,