~frankban/juju-quickstart/interactive-errors

Viewing all changes in revision 67.

  • Committer: Francesco Banconi
  • Date: 2014-04-30 18:24:49 UTC
  • mfrom: (65.2.3 check-locale)
  • Revision ID: francesco.banconi@canonical.com-20140430182449-eut3qnxwtc16enew
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

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: