diff options
author | Gabe Black <gabeblack@chromium.org> | 2014-10-30 20:38:39 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-11-06 20:06:20 +0000 |
commit | b7304b4b6723d5bc61550b4d9c11d34dc15db92e (patch) | |
tree | 82a32f1116e9404dd506a3201044dab0bb3e4973 /cbuildbot/stages/sync_stages_unittest.py | |
parent | 6983ee59c517c87b636bfebde6bfba0dc334a8c3 (diff) | |
download | chromite-b7304b4b6723d5bc61550b4d9c11d34dc15db92e.tar.gz |
cros_build_lib: GetChoice: support pagination to work with generators
When presenting a choice to the user, we might not want to show them all the
options right away. That could be because the first few are the most relevant,
or because there's an unlimited number of them. This change adds an option to
specify the group size, or in other words the number of options to show the
user before asking them to choose. If that number is 0, the default, then the
function shows the entire list. If not all of the options have been shown, the
user can press enter to see another group.
BUG=chromium:399356
TEST=Ran run_tests, ran cros flash and verified it showed the USB key
selection menu correctly. Ran cros pinchrome (not yet submitted) and verified
that it showed a (practically) unbounded menu correctly.
Change-Id: I9227b7a16035b3d11ee12712f0683b3095473759
Reviewed-on: https://chromium-review.googlesource.com/226775
Reviewed-by: David James <davidjames@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'cbuildbot/stages/sync_stages_unittest.py')
0 files changed, 0 insertions, 0 deletions