Files
python-glanceclient/glanceclient
Ian Cordasco 81039a1e36 Handle formatting of subcommand name in error output
On Python 2, decoding all arguments leads to the possibility that users
that use the wrong command or mistype the name will see error output
with a unicode string's representation instead of one without it. To
avoid this we try and find the first non-option string in the argument
list and replace it with an string that is not text only on Python 2. If
we encoded the string at all times, then users installing glanceclient
on Python 3 would see b'invalid-subcommand' instead. That's as bad as
seeing u'invalid-subcommand' on Python 2.

Closes-bug: 1533090
Change-Id: I018769e159a607ebb233902cbeb13b95ca417190
2017-01-11 07:33:34 -06:00
..
2015-07-21 17:08:27 +03:00