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

Unified Diff: gclient_utils.py

Issue 3324007: Rename retcode to returncode to be consistent with subprocess. (Closed)
Patch Set: Created 10 years, 3 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 | tests/fake_repos.py » ('j') | trychange.py » ('J')
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 7558b4266b3aa7bfb622b50500ba2a18eadef68c..cf2cedec5b01284653a96f57061af0dc95dce95a 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -27,13 +27,19 @@ import xml.dom.minidom
import xml.parsers.expat
-class CheckCallError(OSError):
+class Error(Exception):
+ """gclient exception class."""
+ pass
+
+
+class CheckCallError(OSError, Error):
"""CheckCall() returned non-0."""
- def __init__(self, command, cwd, retcode, stdout, stderr=None):
- OSError.__init__(self, command, cwd, retcode, stdout, stderr)
+ def __init__(self, command, cwd, returncode, stdout, stderr=None):
+ OSError.__init__(self, command, cwd, returncode, stdout, stderr)
+ Error.__init__(self)
self.command = command
self.cwd = cwd
- self.retcode = retcode
+ self.returncode = returncode
self.stdout = stdout
self.stderr = stderr
@@ -111,12 +117,6 @@ def GetNodeNamedAttributeText(node, node_name, attribute_name):
return child_nodes[0].getAttribute(attribute_name)
-class Error(Exception):
- """gclient exception class."""
- # TODO(maruel): Merge with CheckCallError.
- pass
-
-
def SyntaxErrorToError(filename, e):
"""Raises a gclient_utils.Error exception with the human readable message"""
try:
« no previous file with comments | « no previous file | tests/fake_repos.py » ('j') | trychange.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698