summaryrefslogtreecommitdiff
path: root/cloudinit/sources
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2016-05-11 14:18:02 -0700
committerJoshua Harlow <harlowja@gmail.com>2016-05-11 14:18:02 -0700
commit26ea813d293467921ab6b1e32abd2ab8fcefa3bd (patch)
treebd641e5867bdd96effa33d62e5c200b5dd7e6331 /cloudinit/sources
parent67e506a50dae2b0c1a806f482670b864e84809ae (diff)
downloadvyos-cloud-init-26ea813d293467921ab6b1e32abd2ab8fcefa3bd.tar.gz
vyos-cloud-init-26ea813d293467921ab6b1e32abd2ab8fcefa3bd.zip
Fix py26 for rhel (and older versions of python)
Diffstat (limited to 'cloudinit/sources')
-rw-r--r--cloudinit/sources/DataSourceAzure.py2
-rw-r--r--cloudinit/sources/helpers/openstack.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py
index 698f4cac..66c8ced8 100644
--- a/cloudinit/sources/DataSourceAzure.py
+++ b/cloudinit/sources/DataSourceAzure.py
@@ -421,7 +421,7 @@ def write_files(datadir, files, dirmode=None):
elem.text = DEF_PASSWD_REDACTION
return ET.tostring(root)
except Exception:
- LOG.critical("failed to redact userpassword in {}".format(fname))
+ LOG.critical("failed to redact userpassword in %s", fname)
return cnt
if not datadir:
diff --git a/cloudinit/sources/helpers/openstack.py b/cloudinit/sources/helpers/openstack.py
index 845ea971..b2acc648 100644
--- a/cloudinit/sources/helpers/openstack.py
+++ b/cloudinit/sources/helpers/openstack.py
@@ -534,13 +534,13 @@ def convert_net_json(network_json):
config = []
for link in links:
subnets = []
- cfg = {k: v for k, v in link.items()
- if k in valid_keys['physical']}
+ cfg = dict((k, v) for k, v in link.items()
+ if k in valid_keys['physical'])
cfg.update({'name': link['id']})
for network in [net for net in networks
if net['link'] == link['id']]:
- subnet = {k: v for k, v in network.items()
- if k in valid_keys['subnet']}
+ subnet = dict((k, v) for k, v in network.items()
+ if k in valid_keys['subnet'])
if 'dhcp' in network['type']:
t = 'dhcp6' if network['type'].startswith('ipv6') else 'dhcp4'
subnet.update({