diff options
author | Feng, Bob C <bob.c.feng@intel.com> | 2019-09-04 13:00:37 +0800 |
---|---|---|
committer | Feng, Bob C <bob.c.feng@intel.com> | 2019-09-17 10:19:05 +0800 |
commit | 0075ab2cec500fc679c6b2e4990142b4a2e51050 (patch) | |
tree | dd5fe19ef82620090e1733e9f7e3322bdf9e1f15 /BaseTools/Source/Python/AutoGen/GenMake.py | |
parent | bc9e4194cf3edaf9524c83098ba3f72008c70190 (diff) | |
download | edk2-0075ab2cec500fc679c6b2e4990142b4a2e51050.tar.gz edk2-0075ab2cec500fc679c6b2e4990142b4a2e51050.tar.bz2 edk2-0075ab2cec500fc679c6b2e4990142b4a2e51050.zip |
BaseTools: remove unnecessary calls of os.exist
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2101
This patch is going to remove unnecessary calls
of os.exist()
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/GenMake.py')
-rwxr-xr-x | BaseTools/Source/Python/AutoGen/GenMake.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py index cda1fbe610..940136248f 100755 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -636,11 +636,13 @@ cleanlib: while not found and os.sep in package_rel_dir:
index = package_rel_dir.index(os.sep)
current_dir = mws.join(current_dir, package_rel_dir[:index])
- if os.path.exists(current_dir):
+ try:
for fl in os.listdir(current_dir):
if fl.endswith('.dec'):
found = True
break
+ except:
+ EdkLogger.error('build', FILE_NOT_FOUND, "WORKSPACE does not exist.")
package_rel_dir = package_rel_dir[index + 1:]
MakefileTemplateDict = {
|