From 611d0cdecbf7b15713824be484e8e91ca889839d Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Sat, 16 Jun 2012 07:38:41 -0700 Subject: Some simple fixes that will make the python 3 translation easier --- cloudinit/transforms/cc_chef.py | 2 +- cloudinit/transforms/cc_ssh.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'cloudinit') diff --git a/cloudinit/transforms/cc_chef.py b/cloudinit/transforms/cc_chef.py index 473e5f8b..31bfb85f 100644 --- a/cloudinit/transforms/cc_chef.py +++ b/cloudinit/transforms/cc_chef.py @@ -69,7 +69,7 @@ def handle(name, cfg, cloud, log, _args): initial_json['run_list'] = chef_cfg['run_list'] if 'initial_attributes' in chef_cfg: initial_attributes = chef_cfg['initial_attributes'] - for k in initial_attributes.keys(): + for k in list(initial_attributes.keys()): initial_json[k] = initial_attributes[k] util.write_file('/etc/chef/firstboot.json', json.dumps(initial_json)) diff --git a/cloudinit/transforms/cc_ssh.py b/cloudinit/transforms/cc_ssh.py index 3c2b3622..f5c22e28 100644 --- a/cloudinit/transforms/cc_ssh.py +++ b/cloudinit/transforms/cc_ssh.py @@ -66,7 +66,7 @@ def handle(_name, cfg, cloud, log, _args): tgt_perms = key2file[key][1] util.write_file(tgt_fn, val, tgt_perms) - for priv, pub in priv2pub.iteritems(): + for (priv, pub) in priv2pub.iteritems(): if pub in cfg['ssh_keys'] or not priv in cfg['ssh_keys']: continue pair = (key2file[priv][0], key2file[pub][0]) -- cgit v1.2.3