]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake-dev: Move the ncurses TTY check into the UI plugin itself.
authorRobert Bradford <rob@openedhand.com>
Fri, 17 Oct 2008 09:46:59 +0000 (09:46 +0000)
committerRobert Bradford <rob@openedhand.com>
Fri, 17 Oct 2008 09:46:59 +0000 (09:46 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5529 311d38ba-8fff-0310-9ca6-ca027cbcb966

bitbake-dev/bin/bitbake
bitbake-dev/lib/bb/ui/ncurses.py

index 87284c08feb4ed49f9827e6f7283fec9d6702879..ea4147e97158206ccb6be0fc64dd203e3b45b5cb 100755 (executable)
@@ -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
index 1476baa61fa344c1d562ee0a4fa0ec4e4651d77d..866792b14fa635d1b60e0f8dd3be681ffc07e09b 100644 (file)
@@ -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)