~wgrant/ubuntu-archive-tools/ddebs-2

« back to all changes in this revision

Viewing changes to sru-review

  • Committer: Stéphane Graber
  • Date: 2013-05-30 21:52:12 UTC
  • Revision ID: stgraber@ubuntu.com-20130530215212-sxgode26rtqmpb17
PEP-8 fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
248
248
                 'and then in the -proposed repository.\n\n' % (
249
249
                     release, sourcepkg, upload.package_version))
250
250
    else:
251
 
        text += ('%s-proposed. The package will build now and be available in a few '
252
 
                 'hours in the -proposed repository.\n\n' % (
 
251
        text += ('%s-proposed. The package will build now and be available in '
 
252
                 'a few hours in the -proposed repository.\n\n' % (
253
253
                     release))
254
254
 
255
255
    text += ('Please help us by testing this new package.  See '
273
273
if __name__ == '__main__':
274
274
 
275
275
    default_release = 'raring'
276
 
    queue_url = 'https://launchpad.net/ubuntu/%s/+queue?queue_state=1&batch=300'
 
276
    queue_url = ('https://launchpad.net/ubuntu/%s/+queue?'
 
277
                 'queue_state=1&batch=300')
277
278
    ppa_url = ('https://launchpad.net/~%s/+archive/%s/+packages?'
278
279
               'field.series_filter=%s')
279
280
 
280
281
    (opts, sourcepkg) = parse_options()
281
282
 
282
283
    launchpad = Launchpad.login_with('sru-review', opts.launchpad_instance,
283
 
        version="devel")
 
284
                                     version="devel")
284
285
    ubuntu = launchpad.distributions['ubuntu']
285
286
    series = ubuntu.getSeries(name_or_version=opts.release)
286
287
    archive = ubuntu.main_archive
306
307
            if pkg not in updates:
307
308
                changesfile_url = pkg.changesFileUrl()
308
309
                changes = parse_changes(changesfile_url)
309
 
                msg = '''\
 
310
                msg = ('''\
310
311
*******************************************************
311
312
*
312
313
* WARNING: %s already published in Proposed (%s)
313
314
* SRU Bug: LP: #%s
314
315
*
315
 
*******************************************************''' % (sourcepkg, pkg.source_package_version, ' LP: #'.join(changes['bugs']))
 
316
*******************************************************''' %
 
317
                       (sourcepkg, pkg.source_package_version,
 
318
                        ' LP: #'.join(changes['bugs'])))
316
319
                print(msg, file=sys.stderr)
317
320
                print('''View the debdiff anyway? [yN]''')
318
321
                response = sys.stdin.readline()
328
331
    else:
329
332
        print('No debdiff available')
330
333
 
331
 
    # parse changes and open bugs first since we are using subprocess to view the diff
 
334
    # parse changes and open bugs first since we are using subprocess
 
335
    # to view the diff
332
336
    if opts.ppa:
333
337
        parse_changes(changes_url)
334
338
    else:
337
341
    if opts.browser and changes['bugs']:
338
342
        for b in changes['bugs']:
339
343
            # use a full url so the right task is highlighted
340
 
            webbrowser.open('https://bugs.launchpad.net/ubuntu/+source/%s/+bug/%s' %
341
 
                (upload.package_name, b))
 
344
            webbrowser.open('https://bugs.launchpad.net/ubuntu/+source/'
 
345
                            '%s/+bug/%s' % (upload.package_name, b))
342
346
 
343
347
    if debdiff and opts.view:
344
348
        tfile = tempfile.mkstemp()