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>
This commit is contained in:
@ -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 = {
|
||||
|
Reference in New Issue
Block a user