terminal: fix issue with unset exportable env vars

This should resolve the devshell issue people are seeing.

(From OE-Core rev: 332f2a9febfc3697ed4a20fca3016e0399ae90eb)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Chris Larson 2011-08-24 13:00:03 -07:00 committed by Richard Purdie
parent f5cddf955d
commit a097c26ca0
1 changed files with 3 additions and 1 deletions

View File

@ -30,7 +30,9 @@ def oe_terminal(command, title, d):
env = dict(os.environ)
for export in oe.data.typed_value('OE_TERMINAL_EXPORTS', d):
env[export] = d.getVar(export, True)
value = d.getVar(export, True)
if value is not None:
env[export] = str(value)
try:
oe.terminal.spawn_preferred(command, title, env)