diff options
author | Joshua Harlow <harlowja@gmail.com> | 2016-07-13 15:18:46 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@gmail.com> | 2016-07-13 15:18:46 -0700 |
commit | 65baa586f1855fac0700497473b2fd1488970edc (patch) | |
tree | 2b29d61a049cf2bb08b59b924d0fa30e0020347c | |
parent | efcd08d9c7dfb7e6a27f71327ddb572fdd8e1cbe (diff) | |
download | cloud-init-65baa586f1855fac0700497473b2fd1488970edc.tar.gz |
Fix SmartOS datasource usage of dict comprehensions
-rw-r--r-- | cloudinit/sources/DataSourceSmartOS.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cloudinit/sources/DataSourceSmartOS.py b/cloudinit/sources/DataSourceSmartOS.py index 08bc132b..ccc86883 100644 --- a/cloudinit/sources/DataSourceSmartOS.py +++ b/cloudinit/sources/DataSourceSmartOS.py @@ -718,8 +718,8 @@ def convert_smartos_network_data(network_data=None): config = [] for nic in network_data: - cfg = {k: v for k, v in nic.items() - if k in valid_keys['physical']} + cfg = dict((k, v) for k, v in nic.items() + if k in valid_keys['physical']) cfg.update({ 'type': 'physical', 'name': nic['interface']}) @@ -728,8 +728,8 @@ def convert_smartos_network_data(network_data=None): subnets = [] for ip, gw in zip(nic['ips'], nic['gateways']): - subnet = {k: v for k, v in nic.items() - if k in valid_keys['subnet']} + subnet = dict((k, v) for k, v in nic.items() + if k in valid_keys['subnet']) subnet.update({ 'type': 'static', 'address': ip, |