[OE-core] [PATCH 3/4] terminal.bbclass: import oe.terminal for oe.terminal.prioritized()

Robert Yang liezhi.yang at windriver.com
Fri Feb 19 08:48:36 UTC 2016


Fixed:
INHERIT += "typecheck"
$ bitbake -p
ERROR: Failure expanding expression auto none ${@" ".join(o.name for o in oe.terminal.prioritized())}
which triggered exception AttributeError: 'module' object has no attribute 'terminal'

Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
 meta/classes/terminal.bbclass |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index fd87cfe..9f4c24e 100644
--- a/meta/classes/terminal.bbclass
+++ b/meta/classes/terminal.bbclass
@@ -1,8 +1,7 @@
 OE_TERMINAL ?= 'auto'
 OE_TERMINAL[type] = 'choice'
 OE_TERMINAL[choices] = 'auto none \
-                        ${@" ".join(o.name \
-                                    for o in oe.terminal.prioritized())}'
+                        ${@oe_terminal_prioritized()}'
 
 OE_TERMINAL_EXPORTS += 'EXTRA_OEMAKE'
 OE_TERMINAL_EXPORTS[type] = 'list'
@@ -10,6 +9,9 @@ OE_TERMINAL_EXPORTS[type] = 'list'
 XAUTHORITY ?= "${HOME}/.Xauthority"
 SHELL ?= "bash"
 
+def oe_terminal_prioritized():
+    import oe.terminal
+    return " ".join(o.name for o in oe.terminal.prioritized())
 
 def emit_terminal_func(command, envdata, d):
     cmd_func = 'do_terminal'
-- 
1.7.9.5




More information about the Openembedded-core mailing list