~smoser/cloud-init/trunk.doc-seedrandom

« back to all changes in this revision

Viewing changes to cloudinit/url_helper.py

sync curtin reporting changes back to cloud-init

this pulls in the reporting framework that we'd been working on
in curtin back to cloud-init.

Show diffs side-by-side

added added

removed removed

Lines of Context:
211
211
    manual_tries = 1
212
212
    if retries:
213
213
        manual_tries = max(int(retries) + 1, 1)
214
 
    if not headers:
215
 
        headers = {
216
 
            'User-Agent': 'Cloud-Init/%s' % (version.version_string()),
217
 
        }
 
214
 
 
215
    def_headers = {
 
216
        'User-Agent': 'Cloud-Init/%s' % (version.version_string()),
 
217
    }
 
218
    if headers:
 
219
        def_headers.update(headers)
 
220
    headers = def_headers
 
221
 
218
222
    if not headers_cb:
219
223
        def _cb(url):
220
224
            return headers