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

Side by Side Diff: gclient_utils.py

Issue 6685023: Make git_cl pass pylint cleanly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: update w/ review feedback Created 9 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2010 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 """Generic utils.""" 5 """Generic utils."""
6 6
7 import errno 7 import errno
8 import logging 8 import logging
9 import os 9 import os
10 import Queue 10 import Queue
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 653
654 def _flush_terminated_threads(self): 654 def _flush_terminated_threads(self):
655 """Flush threads that have terminated.""" 655 """Flush threads that have terminated."""
656 running = self.running 656 running = self.running
657 self.running = [] 657 self.running = []
658 for t in running: 658 for t in running:
659 if t.isAlive(): 659 if t.isAlive():
660 self.running.append(t) 660 self.running.append(t)
661 else: 661 else:
662 t.join() 662 t.join()
663 sys.stdout.full_flush() 663 sys.stdout.full_flush() # pylint: disable=E1101
664 if self.progress: 664 if self.progress:
665 self.progress.update(1, t.item.name) 665 self.progress.update(1, t.item.name)
666 assert not t.item.name in self.ran 666 assert not t.item.name in self.ran
667 if not t.item.name in self.ran: 667 if not t.item.name in self.ran:
668 self.ran.append(t.item.name) 668 self.ran.append(t.item.name)
669 669
670 def _run_one_task(self, task_item, args, kwargs): 670 def _run_one_task(self, task_item, args, kwargs):
671 if self.jobs > 1: 671 if self.jobs > 1:
672 # Start the thread. 672 # Start the thread.
673 index = len(self.ran) + len(self.running) + 1 673 index = len(self.ran) + len(self.running) + 1
(...skipping 29 matching lines...) Expand all
703 logging.info('Caught exception in thread %s' % self.item.name) 703 logging.info('Caught exception in thread %s' % self.item.name)
704 logging.info(str(sys.exc_info())) 704 logging.info(str(sys.exc_info()))
705 work_queue.exceptions.put(sys.exc_info()) 705 work_queue.exceptions.put(sys.exc_info())
706 logging.info('Task %s done' % self.item.name) 706 logging.info('Task %s done' % self.item.name)
707 707
708 work_queue.ready_cond.acquire() 708 work_queue.ready_cond.acquire()
709 try: 709 try:
710 work_queue.ready_cond.notifyAll() 710 work_queue.ready_cond.notifyAll()
711 finally: 711 finally:
712 work_queue.ready_cond.release() 712 work_queue.ready_cond.release()
OLDNEW
« no previous file with comments | « PRESUBMIT.py ('k') | git_cl/PRESUBMIT.py » ('j') | git_cl/git_cl.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698