Fix Python 3 incompatibilities with the rbt command name and pagination.
Review Request #10313 — Created Nov. 8, 2018 and submitted
This fixes two issues that came up involving RBTools running on newer
versions of Python 3.
The first has to do with the
rbt, which an
older change from 2016 set as a byte string in order to avoid string
type issues and logging with Unicode characters. While important then,
we actually want it as a Unicode string now, as the areas that were
sensitive to this now normalize string types for the proper platform.
Keeping it as a byte string actually broke functionality, like custom
rbt-<scriptname>commands, aliases, and bits of help output.
The other issue has to do with pagination.
deprecated, and handled differently on Python 3.7. This resulted in
ListResource.all_pages, which was crashing with this
exception rather than simply stopping iteration. While in time it'd be
better to phase out
StopIteration, we for now catch it where we care
about it and handle it the way we'd expect. This fixes
rbt status, and
rbt post --description="<unicode>",
rbt status, custom aliases, and custom
rbt-*scripts on Python 2.7
and 3.7. All commands worked as expected, with and without Unicode