DataSource: fix is_ipv4 usage

This commit is contained in:
Scott Moser 2011-12-16 12:11:10 -05:00
parent f0465dfacf
commit aa7f1a9a52

View File

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