mirror of https://github.com/acidanthera/audk.git
BaseTools: use map and filter to replace the itertools function
Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
4ce4f757d7
commit
fe3991d635
|
@ -25,7 +25,6 @@ import time
|
||||||
import platform
|
import platform
|
||||||
import traceback
|
import traceback
|
||||||
import encodings.ascii
|
import encodings.ascii
|
||||||
import itertools
|
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
|
|
||||||
from struct import *
|
from struct import *
|
||||||
|
@ -1172,9 +1171,9 @@ class Build():
|
||||||
f = open(PrebuildEnvFile)
|
f = open(PrebuildEnvFile)
|
||||||
envs = f.readlines()
|
envs = f.readlines()
|
||||||
f.close()
|
f.close()
|
||||||
envs = itertools.imap(lambda l: l.split('=', 1), envs)
|
envs = map(lambda l: l.split('=', 1), envs)
|
||||||
envs = itertools.ifilter(lambda l: len(l) == 2, envs)
|
envs = filter(lambda l: len(l) == 2, envs)
|
||||||
envs = itertools.imap(lambda l: [i.strip() for i in l], envs)
|
envs = map(lambda l: [i.strip() for i in l], envs)
|
||||||
os.environ.update(dict(envs))
|
os.environ.update(dict(envs))
|
||||||
EdkLogger.info("\n- Prebuild Done -\n")
|
EdkLogger.info("\n- Prebuild Done -\n")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue