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

Side by Side Diff: tools/auto_bisect/bisect_printer.py

Issue 1001033004: Fix style in tools/auto_bisect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """This file contains printing-related functionality of the bisect.""" 5 """This file contains printing-related functionality of the bisect."""
6 6
7 import datetime 7 import datetime
8 import re 8 import re
9 9
10 from bisect_results import BisectResults 10 from bisect_results import BisectResults
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 step_build_time_avg = step_build_time_avg / step_count 197 step_build_time_avg = step_build_time_avg / step_count
198 print 198 print
199 print 'Average build time : %s' % datetime.timedelta( 199 print 'Average build time : %s' % datetime.timedelta(
200 seconds=int(step_build_time_avg)) 200 seconds=int(step_build_time_avg))
201 print 'Average test time : %s' % datetime.timedelta( 201 print 'Average test time : %s' % datetime.timedelta(
202 seconds=int(step_perf_time_avg)) 202 seconds=int(step_perf_time_avg))
203 203
204 @staticmethod 204 @staticmethod
205 def _GetViewVCLinkFromDepotAndHash(git_revision, depot): 205 def _GetViewVCLinkFromDepotAndHash(git_revision, depot):
206 """Gets link to the repository browser.""" 206 """Gets link to the repository browser."""
207 if depot and bisect_utils.DEPOT_DEPS_NAME[depot].has_key('viewvc'): 207 if depot and 'viewvc' in bisect_utils.DEPOT_DEPS_NAME[depot]:
208 return bisect_utils.DEPOT_DEPS_NAME[depot]['viewvc'] + git_revision 208 return bisect_utils.DEPOT_DEPS_NAME[depot]['viewvc'] + git_revision
209 return '' 209 return ''
210 210
211 def _PrintRevisionInfo(self, cl, info, depot=None): 211 def _PrintRevisionInfo(self, cl, info, depot=None):
212 commit_link = self._GetViewVCLinkFromDepotAndHash(cl, depot) 212 commit_link = self._GetViewVCLinkFromDepotAndHash(cl, depot)
213 if commit_link: 213 if commit_link:
214 commit_link = '\nLink : %s' % commit_link 214 commit_link = '\nLink : %s' % commit_link
215 else: 215 else:
216 commit_link = ('\Description:\n%s' % info['body']) 216 commit_link = ('\Description:\n%s' % info['body'])
217 print RESULTS_REVISION_INFO % { 217 print RESULTS_REVISION_INFO % {
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 406
407 @staticmethod 407 @staticmethod
408 def _PrintWarnings(warnings): 408 def _PrintWarnings(warnings):
409 """Prints a list of warning strings if there are any.""" 409 """Prints a list of warning strings if there are any."""
410 if not warnings: 410 if not warnings:
411 return 411 return
412 print 412 print
413 print 'WARNINGS:' 413 print 'WARNINGS:'
414 for w in set(warnings): 414 for w in set(warnings):
415 print ' ! %s' % w 415 print ' ! %s' % w
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698