mylist = []
for myconfig in config_list:
if var in myconfig:
- mylist.extend(filter(None, myconfig[var].split()))
+ for item in myconfig[var].split():
+ if item and not item in mylist:
+ mylist.append(item)
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(filter(None, myconfig[var].split(":")))
+ for item in myconfig[var].split(":"):
+ if item and not item in mylist:
+ mylist.append(item)
del myconfig[var] # prepare for env.update(myconfig)
if mylist:
env[var] = ":".join(mylist)