From a992edbc1ac749999cdbf52a5b031589a057d2ce Mon Sep 17 00:00:00 2001 From: "dpranke@chromium.org" Date: Wed, 3 Apr 2013 21:22:20 +0000 Subject: [PATCH] fix dryrun, path check in 'fetch' TBR=iannucci@chromium.org, agable@chromium.org, maruel@chromium.org Review URL: https://codereview.chromium.org/13588004 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@192160 0039d316-1c4b-4281-b951-d872f2087c98 --- fetch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fetch.py b/fetch.py index 8e7b852ab..8316ed48e 100755 --- a/fetch.py +++ b/fetch.py @@ -160,6 +160,7 @@ def handle_args(argv): if argv[1] in ('-h', '--help', 'help'): usage() + dryrun = False if argv[1] in ('-n', '--dry-run'): dryrun = True argv.pop(1) @@ -180,7 +181,7 @@ 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): + if not os.path.exists(recipe_path + '.py'): print "Could not find a recipe for %s" % recipe sys.exit(1)