~smoser/ubuntu/quantal/cloud-init/sru

« back to all changes in this revision

Viewing changes to cloudinit/CloudConfig/cc_phone_home.py

  • Committer: Scott Moser
  • Date: 2012-01-12 16:33:53 UTC
  • mto: This revision was merged to the branch mainline in revision 141.
  • Revision ID: smoser@ubuntu.com-20120112163353-nip749m6ytls8sva
Tags: upstream-0.6.3~bzr502
ImportĀ upstreamĀ versionĀ 0.6.3~bzr502

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#  url: http://my.foo.bar/$INSTANCE_ID/
32
32
#  post: [ pub_key_dsa, pub_key_rsa, pub_key_ecdsa, instance_id
33
33
#   
34
 
def handle(name,cfg,cloud,log,args):
 
34
def handle(_name,cfg,cloud,log,args):
35
35
    if len(args) != 0:
36
36
        ph_cfg = util.readconf(args[0])
37
37
    else:
68
68
        try:
69
69
            fp = open(path, "rb")
70
70
            all_keys[n] = fp.read()
71
 
            all_keys[n]
72
71
            fp.close()
73
72
        except:
74
73
            log.warn("%s: failed to open in phone_home" % path)