From 504d17f95719e9501d8a55f95ef16f0467206083 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Tue, 12 Jul 2016 17:17:41 -0700 Subject: Dict comprehensions don't work in 2.6 --- cloudinit/net/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cloudinit/net') diff --git a/cloudinit/net/__init__.py b/cloudinit/net/__init__.py index 63e54f91..21cc602b 100644 --- a/cloudinit/net/__init__.py +++ b/cloudinit/net/__init__.py @@ -252,7 +252,8 @@ def _rename_interfaces(renames, strict_present=True, strict_busy=True, cur_bymac[mac] = cur def update_byname(bymac): - return {data['name']: data for data in bymac.values()} + return dict((data['name'], data) + for data in bymac.values()) def rename(cur, new): util.subp(["ip", "link", "set", cur, "name", new], capture=True) -- cgit v1.2.3 From ba55775fbd18452d79d5962c912995ac36567dc2 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Wed, 13 Jul 2016 15:10:54 -0700 Subject: String format requires positions on python 2.6 --- cloudinit/net/eni.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cloudinit/net') diff --git a/cloudinit/net/eni.py b/cloudinit/net/eni.py index e5ed10fd..91f83e60 100644 --- a/cloudinit/net/eni.py +++ b/cloudinit/net/eni.py @@ -61,7 +61,7 @@ def _iface_add_subnet(iface, subnet): value = " ".join(value) if '_' in key: key = key.replace('_', '-') - content += " {} {}\n".format(key, value) + content += " {0} {1}\n".format(key, value) return content @@ -86,7 +86,7 @@ def _iface_add_attrs(iface): if value and key not in ignore_map: if type(value) == list: value = " ".join(value) - content += " {} {}\n".format(key, value) + content += " {0} {1}\n".format(key, value) return content -- cgit v1.2.3