diff options
author | Yunhua Feng <yunhuax.feng@intel.com> | 2018-07-27 15:53:45 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-10-13 09:50:44 +0800 |
commit | fe3991d63552f2eb25ff728a81a6976a3b1f652b (patch) | |
tree | 66a36df12fb7a9fbdaf0368761c8de3161a1d0eb /BaseTools/Source/Python | |
parent | 4ce4f757d77adc773ff0abc9bd5960e5b1dd9a73 (diff) | |
download | edk2-fe3991d63552f2eb25ff728a81a6976a3b1f652b.tar.gz edk2-fe3991d63552f2eb25ff728a81a6976a3b1f652b.tar.bz2 edk2-fe3991d63552f2eb25ff728a81a6976a3b1f652b.zip |
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>
Diffstat (limited to 'BaseTools/Source/Python')
-rw-r--r-- | BaseTools/Source/Python/build/build.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index 7715cfa52a..2629d6046d 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -25,7 +25,6 @@ import time import platform
import traceback
import encodings.ascii
-import itertools
import multiprocessing
from struct import *
@@ -1172,9 +1171,9 @@ class Build(): f = open(PrebuildEnvFile)
envs = f.readlines()
f.close()
- envs = itertools.imap(lambda l: l.split('=', 1), envs)
- envs = itertools.ifilter(lambda l: len(l) == 2, envs)
- envs = itertools.imap(lambda l: [i.strip() for i in l], envs)
+ envs = map(lambda l: l.split('=', 1), envs)
+ envs = filter(lambda l: len(l) == 2, envs)
+ envs = map(lambda l: [i.strip() for i in l], envs)
os.environ.update(dict(envs))
EdkLogger.info("\n- Prebuild Done -\n")
|