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

Side by Side Diff: scripts/slave/build_scan.py

Issue 247693003: Revert of whitespace change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Scans a list of masters and saves information in a build_db.""" 6 """Scans a list of masters and saves information in a build_db."""
7 7
8 from contextlib import closing 8 from contextlib import closing
9 import json 9 import json
10 import logging 10 import logging
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 with closing(urllib2.urlopen(url)) as f: 105 with closing(urllib2.urlopen(url)) as f:
106 return json.load(f), master, builder, buildnum 106 return json.load(f), master, builder, buildnum
107 107
108 108
109 def get_build_jsons(master_builds, processes): 109 def get_build_jsons(master_builds, processes):
110 """Get all new builds on specified masters. 110 """Get all new builds on specified masters.
111 111
112 This takes a dict in the form of [master][builder][build], formats that URL 112 This takes a dict in the form of [master][builder][build], formats that URL
113 and appends that to url_list. Then, it forks out and queries each build_url 113 and appends that to url_list. Then, it forks out and queries each build_url
114 for build information. 114 for build information.
115
116 """ 115 """
117 url_list = [] 116 url_list = []
118 for master, builder_dict in master_builds.iteritems(): 117 for master, builder_dict in master_builds.iteritems():
119 for builder, new_builds in builder_dict.iteritems(): 118 for builder, new_builds in builder_dict.iteritems():
120 for buildnum in new_builds: 119 for buildnum in new_builds:
121 safe_builder = urllib.quote(builder) 120 safe_builder = urllib.quote(builder)
122 url = master + '/json/builders/%s/builds/%s' % (safe_builder, 121 url = master + '/json/builders/%s/builds/%s' % (safe_builder,
123 buildnum) 122 buildnum)
124 url_list.append((url, master, builder, buildnum)) 123 url_list.append((url, master, builder, buildnum))
125 124
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 print '%s:%s:%s' % (master_url, builder, buildnum) 200 print '%s:%s:%s' % (master_url, builder, buildnum)
202 201
203 if not options.skip_build_db_update: 202 if not options.skip_build_db_update:
204 build_scan_db.save_build_db(build_db, {}, options.build_db) 203 build_scan_db.save_build_db(build_db, {}, options.build_db)
205 204
206 return 0 205 return 0
207 206
208 207
209 if __name__ == '__main__': 208 if __name__ == '__main__':
210 sys.exit(main()) 209 sys.exit(main())
OLDNEW
« 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