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

Side by Side Diff: gclient_utils.py

Issue 6897034: Fix constructor arguments to OSError. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 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 # 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 14 matching lines...) Expand all
25 25
26 26
27 class Error(Exception): 27 class Error(Exception):
28 """gclient exception class.""" 28 """gclient exception class."""
29 pass 29 pass
30 30
31 31
32 class CheckCallError(OSError, Error): 32 class CheckCallError(OSError, Error):
33 """CheckCall() returned non-0.""" 33 """CheckCall() returned non-0."""
34 def __init__(self, command, cwd, returncode, stdout, stderr=None): 34 def __init__(self, command, cwd, returncode, stdout, stderr=None):
35 OSError.__init__(self, command, cwd, returncode, stdout, stderr) 35 OSError.__init__(self, command, cwd, returncode)
36 Error.__init__(self, command) 36 Error.__init__(self, command)
37 self.command = command 37 self.command = command
38 self.cwd = cwd 38 self.cwd = cwd
39 self.returncode = returncode 39 self.returncode = returncode
40 self.stdout = stdout 40 self.stdout = stdout
41 self.stderr = stderr 41 self.stderr = stderr
42 42
43 def __str__(self): 43 def __str__(self):
44 out = ' '.join(self.command) 44 out = ' '.join(self.command)
45 if self.cwd: 45 if self.cwd:
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 logging.info('Caught exception in thread %s' % self.item.name) 678 logging.info('Caught exception in thread %s' % self.item.name)
679 logging.info(str(sys.exc_info())) 679 logging.info(str(sys.exc_info()))
680 work_queue.exceptions.put(sys.exc_info()) 680 work_queue.exceptions.put(sys.exc_info())
681 logging.info('Task %s done' % self.item.name) 681 logging.info('Task %s done' % self.item.name)
682 682
683 work_queue.ready_cond.acquire() 683 work_queue.ready_cond.acquire()
684 try: 684 try:
685 work_queue.ready_cond.notifyAll() 685 work_queue.ready_cond.notifyAll()
686 finally: 686 finally:
687 work_queue.ready_cond.release() 687 work_queue.ready_cond.release()
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