summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2016-07-12 17:17:41 -0700
committerJoshua Harlow <harlowja@gmail.com>2016-07-12 17:17:41 -0700
commit504d17f95719e9501d8a55f95ef16f0467206083 (patch)
treea38d394f763c7cbc45e42a4e8c1098507040b5f3
parentb3193a4b5204d12825d8317bf0f8c3577c1d8153 (diff)
downloadvyos-cloud-init-504d17f95719e9501d8a55f95ef16f0467206083.tar.gz
vyos-cloud-init-504d17f95719e9501d8a55f95ef16f0467206083.zip
Dict comprehensions don't work in 2.6
-rw-r--r--cloudinit/net/__init__.py3
1 files changed, 2 insertions, 1 deletions
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)