Fix encoding domain names with trailing dot

review949002
This commit is contained in:
Cédric Krier committed 2013-06-26 22:44:12 +02:00
1 parent 0c25656726
commit afa718b4cf
1 file changed
+2 -2
+2 -2
View File
@@ -12,8 +12,8 @@ __all__ = ['URLMixin']
HOSTNAME = (CONFIG['hostname_jsonrpc']
or unicode(socket.getfqdn(), 'utf8'))
HOSTNAME = '.'.join(encodings.idna.ToASCII(part) for part in
HOSTNAME.split('.'))
HOSTNAME = '.'.join(encodings.idna.ToASCII(part) if part else ''
for part in HOSTNAME.split('.'))
class URLAccessor(object):