[bitbake-devel] [PATCH] lib/bb/utils: no need to unsetenv when manipulating os.environ

Ross Burton ross.burton at intel.com
Tue Jul 19 14:19:04 UTC 2016


Doing both os.unsetenv(foo) and then del os.environ[foo] is pointless as del
will call unsetenv automatically.

Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 bitbake/lib/bb/utils.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 561db6b..995089a 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -600,7 +600,6 @@ def filter_environment(good_vars):
             continue
 
         removed_vars[key] = os.environ[key]
-        os.unsetenv(key)
         del os.environ[key]
 
     # If we spawn a python process, we need to have a UTF-8 locale, else python's file
-- 
2.8.1




More information about the bitbake-devel mailing list