New issue
Advanced search Search tips

Issue 877119 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 29
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

gsubmodd test stdout diversion conflicts with Python `print`

Project Member Reported by flyboy@chromium.org, Aug 23

Issue description

In gsubmodd_test.py (whose structure was modeled after gsubtreed_test.py) we capture stdout by redirecting it to a file.  However, the way it is now, if we add a Python `print` statement somewhere in the execution path (for temporary debugging), all hell breaks loose: Git operations start breaking, which should have nothing to do with the added debugging output.

Opening the stdout capture file for 'w+' instead of the default read-only eliminates the problem.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 29

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/14445c2469bc069c0b59c10d0149ffa20fb32033

commit 14445c2469bc069c0b59c10d0149ffa20fb32033
Author: Alan Bram <flyboy@chromium.org>
Date: Wed Aug 29 22:17:19 2018

Fix stdout capture (when useful for debugging)

Bug:  877119 

Change-Id: I358f943d4884a55593d51eeb5161fa8dacfbd1ac
Reviewed-on: https://chromium-review.googlesource.com/1187189
Commit-Queue: Alan Bram <flyboy@chromium.org>
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#17294}
[modify] https://crrev.com/14445c2469bc069c0b59c10d0149ffa20fb32033/infra/services/gsubmodd/test/gsubmodd_test.py

Status: Fixed (was: Started)

Sign in to add a comment