Currently, Basetools only verifies Binary file list existance for default ARCH,
but it should verify for a specified ARCH the same.
Also, dont save the list to a unused variable.

Cc: Yonghong Zhu <[email protected]>
Cc: Liming Gao <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <[email protected]>
---
 BaseTools/Source/Python/GenFds/AprioriSection.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/BaseTools/Source/Python/GenFds/AprioriSection.py 
b/BaseTools/Source/Python/GenFds/AprioriSection.py
index 7196f7f2c753..70aa150799a7 100644
--- a/BaseTools/Source/Python/GenFds/AprioriSection.py
+++ b/BaseTools/Source/Python/GenFds/AprioriSection.py
@@ -89,12 +89,10 @@ class AprioriSection (AprioriSectionClassObject):
                     Inf = 
GenFdsGlobalVariable.WorkSpace.BuildObject[PathClass(InfFileName, 
GenFdsGlobalVariable.WorkSpaceDir), TAB_COMMON, 
GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
                     Guid = Inf.Guid
 
-                    self.BinFileList = Inf.Module.Binaries
-                    if self.BinFileList == []:
-                        EdkLogger.error("GenFds", RESOURCE_NOT_AVAILABLE,
-                                        "INF %s not found in build ARCH %s!" \
-                                        % (InfFileName, 
GenFdsGlobalVariable.ArchList))
-
+                if not Inf.Module.Binaries:
+                    EdkLoggerError("GenFds", RESOURCE_NOT_AVAILABLE,
+                                    "INF %s not found in build ARCH %s!" \
+                                    % (InfFileName, 
GenFdsGlobalVariable.ArchList))
 
             GuidPart = Guid.split('-')
             Buffer.write(pack('I', long(GuidPart[0], 16)))
-- 
2.16.2.windows.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to