From e3606abc5a50430de4512630366d2023ac2daf00 Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Fri, 9 Sep 2011 16:30:46 +0000 Subject: [PATCH] Fix check_output usage in trychange.py Update the command for subprocess.CalledProcessError TBR=dpranke@chromium.org BUG= TEST= Review URL: http://codereview.chromium.org/7860047 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100410 0039d316-1c4b-4281-b951-d872f2087c98 --- trychange.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/trychange.py b/trychange.py index 54a02d992..50e32b859 100755 --- a/trychange.py +++ b/trychange.py @@ -401,12 +401,10 @@ def _SendChangeSVN(options): if scm.SVN.AssertVersion("1.5")[0]: command.append('--no-ignore') - subprocess2.check_output(command, stdout=subprocess2.VOID) + subprocess2.check_output( + command, stdout=subprocess2.PIPE, stderr=subprocess2.STDOUT) except subprocess2.CalledProcessError, e: - out = e.stdout - if e.stderr: - out += e.stderr - raise NoTryServerAccess(' '.join(e.command) + '\nOuput:\n' + out) + raise NoTryServerAccess(' '.join(e.cmd) + '\nOuput:\n' + e.stdout) finally: temp_file.close() shutil.rmtree(temp_dir, True)