Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: recipe_engine/fetch.py

Issue 2845923002: [recipes.py] use argparse to set command automatically. (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « recipe_engine/doc.py ('k') | recipe_engine/lint_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2017 The LUCI Authors. All rights reserved. 1 # Copyright 2017 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # that can be found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 import calendar 5 import calendar
6 import httplib 6 import httplib
7 import json 7 import json
8 import logging 8 import logging
9 import os 9 import os
10 import re 10 import re
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 helpstr = 'Fetch and update dependencies but take no other action.' 598 helpstr = 'Fetch and update dependencies but take no other action.'
599 599
600 fetch_p = parser.add_parser( 600 fetch_p = parser.add_parser(
601 'fetch', help=helpstr, description=helpstr) 601 'fetch', help=helpstr, description=helpstr)
602 602
603 def postprocess_func(parser, args): 603 def postprocess_func(parser, args):
604 if args.no_fetch: 604 if args.no_fetch:
605 parser.error('--no-fetch does not make sense with fetch command') 605 parser.error('--no-fetch does not make sense with fetch command')
606 606
607 fetch_p.set_defaults( 607 fetch_p.set_defaults(
608 command='fetch',
609 # fetch action is implied by recipes.py 608 # fetch action is implied by recipes.py
610 func=(lambda package_deps, engine_flags: 0), 609 func=(lambda package_deps, engine_flags: 0),
611 postprocess_func=postprocess_func, 610 postprocess_func=postprocess_func,
612 ) 611 )
OLDNEW
« no previous file with comments | « recipe_engine/doc.py ('k') | recipe_engine/lint_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698