handle unknown recipes in 'fetch'.

TBR=iannucci@chromium.org, agable@chromium.org, maruel@chromium.org

Review URL: https://codereview.chromium.org/13586005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@192157 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
dpranke@chromium.org 12 years ago
parent 0a58ef84b5
commit 2bf328a8f9

@ -180,8 +180,13 @@ def run_recipe_fetch(recipe, props, aliased=False):
"""Invoke a recipe's fetch method with the passed-through args
and return its json output as a python object."""
recipe_path = os.path.abspath(os.path.join(SCRIPT_PATH, 'recipes', recipe))
if not os.path.exists(recipe_path):
print "Could not find a recipe for %s" % recipe
sys.exit(1)
cmd = [sys.executable, recipe_path + '.py', 'fetch'] + props
result = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
spec = json.loads(result)
if 'alias' in spec:
assert not aliased

Loading…
Cancel
Save