From bd63867cbe48eab91523731def4cec80187b5c0f Mon Sep 17 00:00:00 2001 From: Robert Bradford Date: Fri, 17 Oct 2008 09:46:59 +0000 Subject: bitbake-dev: Move the ncurses TTY check into the UI plugin itself. git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5529 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- bitbake-dev/lib/bb/ui/ncurses.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bitbake-dev/lib/bb/ui/ncurses.py') diff --git a/bitbake-dev/lib/bb/ui/ncurses.py b/bitbake-dev/lib/bb/ui/ncurses.py index 1476baa61..866792b14 100644 --- a/bitbake-dev/lib/bb/ui/ncurses.py +++ b/bitbake-dev/lib/bb/ui/ncurses.py @@ -324,6 +324,9 @@ class NCursesUI: pass def init(server, eventHandler): + if not os.isatty(sys.stdout.fileno()): + print "FATAL: Unable to run 'ncurses' UI without a TTY." + return ui = NCursesUI() try: curses.wrapper(ui.main, server, eventHandler) -- cgit v1.2.3