Code review comment for lp://qastaging/~frankban/juju-quickstart/check-locale

Revision history for this message
Francesco Banconi (frankban) wrote :

*** Submitted:

Check unicode support.

Ensure utf-8 is supported before starting
the Urwid interactive session.
This way we hope to avoid bad crashes
when the user has locale configuration problems.

Tests: `make check`.

QA:
If you have juju-quickstart installed, you should
be able to make it crash by overriding all the language
env vars, like the following:
`LC_ALL=C juju-quickstart -i`
You should see a UnicodeEncodeError:
'ascii' codec can't encode character u'\u2582' in position 0:
ordinal not in range(128)

With this branch, the following should instead work as usual:
`LC_ALL=C .venv/bin/python juju-quickstart -i`.

I am not sure how to make Urwid fail so that we can QA
the system exit in the code, but at least that code path
is tested.

R=rharding
CC=
https://codereview.appspot.com/90740043

https://codereview.appspot.com/90740043/

« Back to merge proposal