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

Unified Diff: gclient_utils.py

Issue 551215: Change CheckCall behavior when print_error=False (Closed)
Patch Set: Created 10 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | scm.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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):
« no previous file with comments | « no previous file | scm.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698