summaryrefslogtreecommitdiff
path: root/cloudinit/sources/__init__.py
diff options
context:
space:
mode:
authorAndy Grimm <agrimm@eucalyptus.com>2012-09-14 11:50:11 -0400
committerAndy Grimm <agrimm@eucalyptus.com>2012-09-14 11:50:11 -0400
commitacdc3c45a3deefaf599627eee889d11299525c4c (patch)
tree16fdf3970f837c1f8ec7ed9673b829947fee8d32 /cloudinit/sources/__init__.py
parent75bec162045856b39b483d11a0b3a7a75886efd2 (diff)
downloadvyos-cloud-init-acdc3c45a3deefaf599627eee889d11299525c4c.tar.gz
vyos-cloud-init-acdc3c45a3deefaf599627eee889d11299525c4c.zip
Fix hostname derived from IP. (LP: 1050962)
Diffstat (limited to 'cloudinit/sources/__init__.py')
-rw-r--r--cloudinit/sources/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/sources/__init__.py b/cloudinit/sources/__init__.py
index 3f611d44..6f126091 100644
--- a/cloudinit/sources/__init__.py
+++ b/cloudinit/sources/__init__.py
@@ -173,7 +173,7 @@ class DataSource(object):
# make up a hostname (LP: #475354) in format ip-xx.xx.xx.xx
lhost = self.metadata['local-hostname']
if util.is_ipv4(lhost):
- toks = "ip-%s" % lhost.replace(".", "-")
+ toks = [ "ip-%s" % lhost.replace(".", "-") ]
else:
toks = lhost.split(".")