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)
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)