mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
depot_tools: Use gclient_utils.AskForData instead of raw_input.
gclient_utils.AskForData will use raw_input on Python 2 and input on Python 3. Bug: 1063976 Change-Id: I93c059c4e4454d01787716b5a0a2641ad5253f53 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2116370 Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org> Reviewed-by: Anthony Polito <apolito@google.com> Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
This commit is contained in:
@@ -12,6 +12,9 @@ import owners as owners_module
|
||||
import random
|
||||
|
||||
|
||||
import gclient_utils
|
||||
|
||||
|
||||
def first(iterable):
|
||||
for element in iterable:
|
||||
return element
|
||||
@@ -126,7 +129,7 @@ class OwnersFinder(object):
|
||||
self.list_owners(self.owners_queue)
|
||||
break
|
||||
elif inp == 'p' or inp == 'pick':
|
||||
self.pick_owner(raw_input('Pick an owner: '))
|
||||
self.pick_owner(gclient_utils.AskForData('Pick an owner: '))
|
||||
break
|
||||
elif inp.startswith('p ') or inp.startswith('pick '):
|
||||
self.pick_owner(inp.split(' ', 2)[1].strip())
|
||||
@@ -373,5 +376,5 @@ class OwnersFinder(object):
|
||||
|
||||
def input_command(self, owner):
|
||||
self.writeln('Add ' + self.bold_name(owner) + ' as your reviewer? ')
|
||||
return raw_input(
|
||||
return gclient_utils.AskForData(
|
||||
'[yes/no/Defer/pick/files/owners/quit/restart]: ').lower()
|
||||
|
||||
Reference in New Issue
Block a user