summaryrefslogtreecommitdiff
path: root/bitbake-dev
diff options
context:
space:
mode:
authorRobert Bradford <rob@openedhand.com>2008-10-17 09:46:59 +0000
committerRobert Bradford <rob@openedhand.com>2008-10-17 09:46:59 +0000
commitbd63867cbe48eab91523731def4cec80187b5c0f (patch)
treeadf7665910884f47a227f03db5f1577844574c09 /bitbake-dev
parent39ad2b3120e50e8c88d03fcd323f2369ffbfe850 (diff)
downloadopenembedded-core-bd63867cbe48eab91523731def4cec80187b5c0f.tar.gz
openembedded-core-bd63867cbe48eab91523731def4cec80187b5c0f.tar.bz2
openembedded-core-bd63867cbe48eab91523731def4cec80187b5c0f.tar.xz
openembedded-core-bd63867cbe48eab91523731def4cec80187b5c0f.zip
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
Diffstat (limited to 'bitbake-dev')
-rwxr-xr-xbitbake-dev/bin/bitbake5
-rw-r--r--bitbake-dev/lib/bb/ui/ncurses.py3
2 files changed, 3 insertions, 5 deletions
diff --git a/bitbake-dev/bin/bitbake b/bitbake-dev/bin/bitbake
index 87284c08f..ea4147e97 100755
--- a/bitbake-dev/bin/bitbake
+++ b/bitbake-dev/bin/bitbake
@@ -123,7 +123,6 @@ Default BBFILES are the .bb files in the current directory.""" )
configuration.pkgs_to_build = []
configuration.pkgs_to_build.extend(args[1:])
-
# Work out which UI(s) to use
curseUI = False
depexplorerUI = False
@@ -168,10 +167,6 @@ Default BBFILES are the .bb files in the current directory.""" )
# Launch the UI
try:
- # Disable UIs that need a terminal
- if not os.isatty(sys.stdout.fileno()):
- curseUI = False
-
if curseUI:
try:
import curses
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)