-
Christian Flach authored
The (raw_)input Python function used by `gclient_utils.AskForData` supports additional 'elaborate line editing' [1] [2] features, such as the ability to use backspace to fix a typo, if the readline module is loaded. Make sure that readline is loaded by importing it locally in `gclient_utils.AskForData`. It does not appear to be possible to write a test that verifies this behavior - assigning `io.StringIO` to `sys.stdin` appears to cause (raw_)input to fall back to basic input processing. [1] https://docs.python.org/2.7/library/functions.html#raw_input [2] https://docs.python.org/3/library/functions.html#input Change-Id: Ie1c25b3fa2f3a255b78426c20e47c968cd7198ab Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3306613Reviewed-by:
Josip Sokcevic <sokcevic@google.com> Commit-Queue: Christian Flach <cmfcmf@chromium.org>
e6855438