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

Unified Diff: subprocess2.py

Issue 582933002: Make check_output of subprocess2 compatible with Python's subprocess. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: compatibility typo Created 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: subprocess2.py
diff --git a/subprocess2.py b/subprocess2.py
index 9f547a63bbb84939d9ff29010abee0a99e23cb7d..6e138a503fbbd22340ab74c65f2e4580536ac0ee 100644
--- a/subprocess2.py
+++ b/subprocess2.py
@@ -34,8 +34,8 @@ SUBPROCESS_CLEANUP_HACKED = False
class CalledProcessError(subprocess.CalledProcessError):
"""Augment the standard exception with more data."""
def __init__(self, returncode, cmd, cwd, stdout, stderr):
- super(CalledProcessError, self).__init__(returncode, cmd)
- self.stdout = stdout
+ super(CalledProcessError, self).__init__(returncode, cmd, output=stdout)
+ self.stdout = self.output # for backward compatibility.
self.stderr = stderr
self.cwd = cwd
« 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