Fix hostname derived from IP. (LP: 1050962)
This commit is contained in:
parent
7e7a83c099
commit
efc97dd1bb
@ -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(".")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user