diff options
author | Joshua Harlow <harlowja@gmail.com> | 2016-07-12 17:17:41 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@gmail.com> | 2016-07-12 17:17:41 -0700 |
commit | 504d17f95719e9501d8a55f95ef16f0467206083 (patch) | |
tree | a38d394f763c7cbc45e42a4e8c1098507040b5f3 /cloudinit/net/__init__.py | |
parent | b3193a4b5204d12825d8317bf0f8c3577c1d8153 (diff) | |
download | vyos-cloud-init-504d17f95719e9501d8a55f95ef16f0467206083.tar.gz vyos-cloud-init-504d17f95719e9501d8a55f95ef16f0467206083.zip |
Dict comprehensions don't work in 2.6
Diffstat (limited to 'cloudinit/net/__init__.py')
-rw-r--r-- | cloudinit/net/__init__.py | 3 |
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) |