~asac/phablet-tools/wait-for-online-with-nm-tool

« back to all changes in this revision

Viewing changes to phablet-flash

  • Committer: Tarmac
  • Author(s): Sergio Schvezov
  • Date: 2013-07-12 03:41:21 UTC
  • mfrom: (126.1.2 current-pending)
  • Revision ID: tarmac-20130712034121-8drbalex5v1rvc0r
Allow for installing from pending using --pending and picking up current from its link.

Approved by Ricardo Salveti, PS Jenkins bot, Alan Pope ㋛.

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
                       required=False,
120
120
                       help='Alternate download uri',
121
121
                      )
 
122
    group.add_argument('--pending',
 
123
                       action='store_true',
 
124
                       required=False,
 
125
                       help='Get pending link from cdimage',
 
126
                      )
122
127
    return parser.parse_args()
123
128
 
124
129
 
307
312
 
308
313
 
309
314
def main(args):
 
315
    if args.legacy and args.pending:
 
316
        log.error('Cannot use legacy and pending together')
 
317
        exit(1)
310
318
    if args.list_revisions:
311
319
        # Easy hack to get rid of the logger and inhibit requests from logging
312
320
        log.setLevel(logging.FATAL)
313
321
        env = environment.Environment(args.uri, None, args.series, 
314
 
            args.revision, args.latest_revision, args.legacy, args.base_path, 
315
 
            settings)
 
322
            args.latest_revision, args.revision, args.pending,  args.legacy, 
 
323
            args.base_path, settings)
316
324
        env.project.list_revisions()
317
325
        exit(0)
318
326
    if not has_accepted(accepted_pathname()) and \
327
335
    device = detect_device(adb, args.device)
328
336
    try:
329
337
        env = environment.Environment(args.uri, device, args.series, 
330
 
            args.revision, args.latest_revision, args.legacy, args.base_path, 
331
 
            settings)
 
338
            args.latest_revision, args.revision, args.pending,  args.legacy, 
 
339
            args.base_path, settings)
332
340
    except EnvironmentError as e:
333
341
        log.error(e.message)
334
342
        exit(1)