~smoser/ubuntu/xenial/cloud-init/lp1506187

« back to all changes in this revision

Viewing changes to cloudinit/config/cc_phone_home.py

  • Committer: Package Import Robot
  • Author(s): Scott Moser
  • Date: 2013-04-11 12:55:51 UTC
  • mfrom: (245.3.9 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20130411125551-8k60jsoot7t21z4b
* New upstream snapshot.
  * make apt-get invoke 'dist-upgrade' rather than 'upgrade' for
    package_upgrade. (LP: #1164147)
  * workaround 2.6 kernel issue that stopped blkid from showing /dev/sr0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# vi: ts=4 expandtab
2
2
#
3
3
#    Copyright (C) 2011 Canonical Ltd.
4
 
#    Copyright (C) 2012, 2013 Hewlett-Packard Development Company, L.P.
 
4
#    Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
5
5
#
6
6
#    Author: Scott Moser <scott.moser@canonical.com>
7
7
#    Author: Juerg Haefliger <juerg.haefliger@hp.com>
65
65
        tries = int(tries)
66
66
    except:
67
67
        tries = 10
68
 
        util.logexc(log, "Configuration entry 'tries' is not an integer, "
69
 
                    "using %s instead", tries)
 
68
        util.logexc(log, ("Configuration entry 'tries'"
 
69
                          " is not an integer, using %s instead"), tries)
70
70
 
71
71
    if post_list == "all":
72
72
        post_list = POST_LIST_ALL
85
85
        try:
86
86
            all_keys[n] = util.load_file(path)
87
87
        except:
88
 
            util.logexc(log, "%s: failed to open, can not phone home that "
89
 
                        "data!", path)
 
88
            util.logexc(log, ("%s: failed to open, can not"
 
89
                              " phone home that data!"), path)
90
90
 
91
91
    submit_keys = {}
92
92
    for k in post_list:
115
115
                              retries=tries, sec_between=3,
116
116
                              ssl_details=util.fetch_ssl_details(cloud.paths))
117
117
    except:
118
 
        util.logexc(log, "Failed to post phone home data to %s in %s tries",
119
 
                    url, tries)
 
118
        util.logexc(log, ("Failed to post phone home data to"
 
119
                          " %s in %s tries"), url, tries)