mirror of https://github.com/acidanthera/audk.git
BaseTools: Add error handling for current_dir is not exist
Add the error handling to cover the case that current_dir is not exist. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
b34e446122
commit
570ae1ebc8
|
@ -597,10 +597,11 @@ cleanlib:
|
||||||
while not found and os.sep in package_rel_dir:
|
while not found and os.sep in package_rel_dir:
|
||||||
index = package_rel_dir.index(os.sep)
|
index = package_rel_dir.index(os.sep)
|
||||||
current_dir = mws.join(current_dir, package_rel_dir[:index])
|
current_dir = mws.join(current_dir, package_rel_dir[:index])
|
||||||
for fl in os.listdir(current_dir):
|
if os.path.exists(current_dir):
|
||||||
if fl.endswith('.dec'):
|
for fl in os.listdir(current_dir):
|
||||||
found = True
|
if fl.endswith('.dec'):
|
||||||
break
|
found = True
|
||||||
|
break
|
||||||
package_rel_dir = package_rel_dir[index + 1:]
|
package_rel_dir = package_rel_dir[index + 1:]
|
||||||
|
|
||||||
MakefileTemplateDict = {
|
MakefileTemplateDict = {
|
||||||
|
|
Loading…
Reference in New Issue