Do not add line break to the end of stdout/stderr

gsutil.py adds a line break at the end of stdout/stderr when luci-auth is used. This change fixes it.

R=sokcevic, jojwang

Bug: 1412249, 1359383
Change-Id: Ieb200db94d9ed9149e17df93c33802a7433a8d5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4221262
Auto-Submit: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
changes/62/4221262/2
Aravind Vasudevan 2 years ago committed by LUCI CQ
parent 91ea91249f
commit ef2d011ad3

@ -171,10 +171,10 @@ def luci_context(cmd):
return _run_subprocess(cmd, interactive=True)
if p.stdout:
print(p.stdout.decode('utf-8'))
print(p.stdout.decode('utf-8'), end='')
if p.stderr:
print(p.stderr.decode('utf-8'), file=sys.stderr)
print(p.stderr.decode('utf-8'), file=sys.stderr, end='')
return p

Loading…
Cancel
Save