Patchwork terminal: fix issue with unset exportable env vars

login
register
mail settings
Submitter Christopher Larson
Date Aug. 24, 2011, 8 p.m.
Message ID <1314216003-10236-1-git-send-email-kergoth@gmail.com>
Download mbox | patch
Permalink /patch/10501/
State New, archived
Headers show

Comments

Christopher Larson - Aug. 24, 2011, 8 p.m.
From: Chris Larson <chris_larson@mentor.com>

This should resolve the devshell issue people are seeing.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
---
 meta/classes/terminal.bbclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Richard Purdie - Aug. 25, 2011, 1:31 a.m.
On Wed, 2011-08-24 at 13:00 -0700, Chris Larson wrote:
> From: Chris Larson <chris_larson@mentor.com>
> 
> This should resolve the devshell issue people are seeing.
> 
> Signed-off-by: Chris Larson <chris_larson@mentor.com>
> ---
>  meta/classes/terminal.bbclass |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)

Merged to master, thanks.

Richard

Patch

diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index 4123046..f29aeb0 100644
--- a/meta/classes/terminal.bbclass
+++ b/meta/classes/terminal.bbclass
@@ -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)