Commit 7288f885 authored by Dirk Pranke's avatar Dirk Pranke Committed by LUCI CQ

Fix output flushing when getting warnings that should prompt in py3.

When presubmit checks create warnings that should raise a prompt
whether or not to continue, the output wasn't being flushed
properly under python3.

Bug: 1213316
Change-Id: Ibb4b4d965d49f0cd65ccc0737282e5f5b5f58004
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2921323Reviewed-by: 's avatarAnthony Polito <apolito@google.com>
Commit-Queue: Dirk Pranke <dpranke@google.com>
parent 85557a08
......@@ -296,6 +296,7 @@ def _RightHandSideLinesImpl(affected_files):
def prompt_should_continue(prompt_string):
sys.stdout.write(prompt_string)
sys.stdout.flush()
response = sys.stdin.readline().strip().lower()
return response in ('y', 'yes')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment