summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-10-17 20:46:56 +0000
committerZac Medico <zmedico@gentoo.org>2006-10-17 20:46:56 +0000
commitff68c0393a328a04bff228d1e2a5aef7d2d21bbf (patch)
tree5dcf7f8de2ec1cdad80e92ec62c5d3cb5fa9c1d0
parent88235de1a7aec5e8ea35e487df45de41b34cae6b (diff)
downloadportage-ff68c0393a328a04bff228d1e2a5aef7d2d21bbf.tar.gz
portage-ff68c0393a328a04bff228d1e2a5aef7d2d21bbf.tar.bz2
portage-ff68c0393a328a04bff228d1e2a5aef7d2d21bbf.zip
Filter empty elements in cumulative env-update variables. Thanks to Brian Harring for this patch from bug #151694.
svn path=/main/trunk/; revision=4741
-rw-r--r--pym/portage.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 082b98c78..c50507368 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -593,7 +593,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None):
mylist = []
for myconfig in config_list:
if var in myconfig:
- mylist.extend(myconfig[var].split())
+ mylist.extend(filter(None, myconfig[var].split()))
del myconfig[var] # prepare for env.update(myconfig)
if mylist:
env[var] = " ".join(mylist)
@@ -603,7 +603,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None):
mylist = []
for myconfig in config_list:
if var in myconfig:
- mylist.extend(myconfig[var].split(":"))
+ mylist.extend(filter(None, myconfig[var].split(":")))
del myconfig[var] # prepare for env.update(myconfig)
if mylist:
env[var] = ":".join(mylist)