Index: gclient_utils.py |
diff --git a/gclient_utils.py b/gclient_utils.py |
index 3c62afb99deba7c6d40656ca951a9e69eb50be79..22409de64c79719f6c0e35f9ab3fe495920d6f38 100644 |
--- a/gclient_utils.py |
+++ b/gclient_utils.py |
@@ -28,12 +28,13 @@ import xml.parsers.expat |
class CheckCallError(OSError): |
"""CheckCall() returned non-0.""" |
- def __init__(self, command, cwd, retcode, stdout): |
- OSError.__init__(self, command, cwd, retcode, stdout) |
+ def __init__(self, command, cwd, retcode, stdout, stderr=None): |
+ OSError.__init__(self, command, cwd, retcode, stdout, stderr) |
self.command = command |
self.cwd = cwd |
self.retcode = retcode |
self.stdout = stdout |
+ self.stderr = stderr |
def CheckCall(command, cwd=None, print_error=True): |
@@ -50,12 +51,12 @@ def CheckCall(command, cwd=None, print_error=True): |
shell=sys.platform.startswith('win'), |
stdout=subprocess.PIPE, |
stderr=stderr) |
- output = process.communicate()[0] |
+ std_out,std_err = process.communicate() |
M-A Ruel
2010/01/30 03:09:21
std_out, std_err
Nasser Grainawi
2010/01/30 04:49:26
Done.
|
except OSError, e: |
raise CheckCallError(command, cwd, e.errno, None) |
if process.returncode: |
- raise CheckCallError(command, cwd, process.returncode, output) |
- return output |
+ raise CheckCallError(command, cwd, process.returncode, std_out, std_err) |
+ return std_out,std_err |
M-A Ruel
2010/01/30 03:09:21
idem
Nasser Grainawi
2010/01/30 04:49:26
Done.
|
def SplitUrlRevision(url): |