From b25d95cd38daab1a354725d83b9f8f85ddce5dca Mon Sep 17 00:00:00 2001 From: "pliard@chromium.org" Date: Mon, 7 Jan 2013 15:37:13 +0000 Subject: [PATCH] Make getBranchForMilestone() explictly request the CSV data. This fixes the following crash: Traceback (most recent call last): File "/usr/local/google/home/pliard/ssd/depot_tools/drover.py", line 682, in sys.exit(main()) File "/usr/local/google/home/pliard/ssd/depot_tools/drover.py", line 678, in main return drover(options, args) File "/usr/local/google/home/pliard/ssd/depot_tools/drover.py", line 493, in drover options.branch = getBranchForMilestone(options.milestone) File "/usr/local/google/home/pliard/ssd/depot_tools/drover.py", line 393, in getBranchForMilestone version = string.split(parameters[2], '.') IndexError: list index out of range Sending crash report ... args: ['/usr/local/google/home/pliard/ssd/depot_tools/drover.py', '--merge', '175139', '--milestone', '25'] cwd: /mnt/ssd/pliard/chromium/src/drover exception: list index out of range host: vox.par.corp.google.com stack: File "/usr/local/google/home/pliard/ssd/depot_to user: pliard version: 2.7.3 (default, Aug 1 2012, 05:14:39) [GCC 4.6.3 This function is called when the --milestone switch is provided. It requests omahaproxy to fetch the branch corresponding to the provided milestone. This function expects some CSV data coming from omahaproxy although it appeared to actually receive the same HTML data that a browser receives when requesting http://omahaproxy.appspot.com (user agent issue?). Review URL: https://chromiumcodereview.appspot.com/11801007 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@175337 0039d316-1c4b-4281-b951-d872f2087c98 --- drover.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drover.py b/drover.py index 72fc48caee..93428db44d 100755 --- a/drover.py +++ b/drover.py @@ -368,7 +368,7 @@ def getAllFilesInRevision(files_info): def getBranchForMilestone(milestone): """Queries omahaproxy.appspot.com for the branch number given |milestone|. """ - OMAHA_PROXY_URL = "http://omahaproxy.appspot.com" + OMAHA_PROXY_URL = "http://omahaproxy.appspot.com/all?csv=1" request = urllib2.Request(OMAHA_PROXY_URL) try: response = urllib2.urlopen(request)