Skip to contentSkip to conversation

lib/bb/utils: no need to unsetenv when manipulating os.environ

PATCH New Ross Burton 1 participant 1 message Jul 19, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/bb/utils: no need to unsetenv when manipulating os.environ

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

---
 bitbake/lib/bb/utils.py | 1 -
 1 file changed, 1 deletion(-)
bitbake/lib/bb/utils.py +0 -1
index 561db6b..995089a 100644
@@ -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
Signature · 1 line
2.8.1