]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Common/DscClassObject.py
Sync basetools' source and binary files with r1707 of the basetools project.
[mirror_edk2.git] / BaseTools / Source / Python / Common / DscClassObject.py
index ddccf6507da64170dae0ae4c23df60027d145cfd..50b6cc5bcefd753559e17943423af42b4f129ccd 100644 (file)
@@ -385,10 +385,11 @@ class Dsc(DscObject):
             for IncludeFile in IncludeFiles:\r
                 if IncludeFile[1] == Arch or IncludeFile[1] == TAB_ARCH_COMMON.upper():\r
                     Filename = CheckFileExist(self.WorkspaceDir, IncludeFile[0], ContainerFile, TAB_LIBRARIES, '', IncludeFile[2])\r
-                    for NewItem in open(Filename, 'r').readlines():\r
-                        if CleanString(NewItem) == '':\r
-                            continue\r
-                        MergeArches(Libraries, NewItem, Arch)\r
+                    if os.path.exists(Filename):\r
+                        for NewItem in open(Filename, 'r').readlines():\r
+                            if CleanString(NewItem) == '':\r
+                                continue\r
+                            MergeArches(Libraries, NewItem, Arch)\r
 \r
             for Record in RecordSet:\r
                 if Record[1] == Arch or Record[1] == TAB_ARCH_COMMON.upper():\r