Fix hostname derived from IP. (LP: 1050962)

This commit is contained in:
Andy Grimm 2012-09-14 11:50:11 -04:00
parent 7e7a83c099
commit efc97dd1bb

View File

@ -173,7 +173,7 @@ class DataSource(object):
# make up a hostname (LP: #475354) in format ip-xx.xx.xx.xx # make up a hostname (LP: #475354) in format ip-xx.xx.xx.xx
lhost = self.metadata['local-hostname'] lhost = self.metadata['local-hostname']
if util.is_ipv4(lhost): if util.is_ipv4(lhost):
toks = "ip-%s" % lhost.replace(".", "-") toks = [ "ip-%s" % lhost.replace(".", "-") ]
else: else:
toks = lhost.split(".") toks = lhost.split(".")