From e5b7d939ef00d3241bfdf4fc2689100c7c4ab9de Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 4 Nov 2006 05:52:09 +0000 Subject: [PATCH] Filter empty elements in cumulative env-update variables. Thanks to Brian Harring for this patch from bug #151694. (trunk r4741) svn path=/main/branches/2.1.1/; revision=4933 --- pym/portage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pym/portage.py b/pym/portage.py index 7844dc2cc..6c67ac11f 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -509,7 +509,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=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) @@ -519,7 +519,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=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) -- 2.26.2