awslabs / aws-shell

An integrated shell for working with the AWS CLI.
Apache License 2.0
7.15k stars 770 forks source link

Force unicode before interaction #141

Closed joguSD closed 7 years ago

joguSD commented 7 years ago

Prompt toolkit requires that the strings given to it are unicode. Data given to interactions can come from arbitrary sources (service calls) so there must be some mechanism in place ensuring that all strings given to prompt toolkit are of six.text_type. This function will recursively search lists and dicts for strings and encode any non-unicode strings as unicode. This is not ideal but is necessary to move forward.

@JordonPhillips @kyleknap

kyleknap commented 7 years ago

Looks good. Just had comments about adding more test cases and a smaller possible edge case.

kyleknap commented 7 years ago

Looks good. :ship: