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

Unified Diff: fetch.py

Issue 13586005: handle unknown recipes in 'fetch'. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fetch.py
diff --git a/fetch.py b/fetch.py
index 2109017b3da310fb244625f8caab1ca22c536bfb..98555dc078337f671c52af4f3fdf89f90585f43c 100755
--- a/fetch.py
+++ b/fetch.py
@@ -175,8 +175,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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698