diff options
author | Konrad Scherer <Konrad.Scherer@windriver.com> | 2012-08-21 16:05:58 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-08-22 13:48:36 +0100 |
commit | 65a5845ac942d0aa6838c295e41b656f9d2a98bb (patch) | |
tree | a3edb2ea8b1c3cc9ed1bd43620909f93d190cecb /lib/bb/ui/ncurses.py | |
parent | ba15ba16a5d863886bcfd5b3f0bdfff2a6de11a0 (diff) | |
download | openembedded-core-contrib-65a5845ac942d0aa6838c295e41b656f9d2a98bb.tar.gz |
ui: Improve error message if bitbake cannot import python curses module
On some SuSE systems, the curses python module is not installed by default.
Instead of a python failure, we want a nicer error message.
(On SuSE systems the package is typically python-curses.)
Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Reword commit message, rebase to latest bitbake.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/ui/ncurses.py')
-rw-r--r-- | lib/bb/ui/ncurses.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/bb/ui/ncurses.py b/lib/bb/ui/ncurses.py index 1425bbd263..f573b95574 100644 --- a/lib/bb/ui/ncurses.py +++ b/lib/bb/ui/ncurses.py @@ -47,7 +47,13 @@ from __future__ import division import logging -import os, sys, curses, itertools, time, subprocess +import os, sys, itertools, time, subprocess + +try: + import curses +except ImportError: + sys.exit("FATAL: The ncurses ui could not load the required curses python module.") + import bb import xmlrpclib from bb import ui |