]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Workspace/WorkspaceCommon.py
BaseTools: Fixed metafile parser issues
[mirror_edk2.git] / BaseTools / Source / Python / Workspace / WorkspaceCommon.py
index 8d8a3e278987ee64f5fe0d3eb5ee32709730d0d4..55d01fa4b21113e9b24599c3b468d5cd89ee3195 100644 (file)
@@ -128,13 +128,10 @@ def GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, Target, Toolcha
         for LibraryClassName in M.LibraryClasses:\r
             if LibraryClassName not in LibraryInstance:\r
                 # override library instance for this module\r
-                if LibraryClassName in Platform.Modules[str(Module)].LibraryClasses:\r
-                    LibraryPath = Platform.Modules[str(Module)].LibraryClasses[LibraryClassName]\r
-                else:\r
-                    LibraryPath = Platform.LibraryClasses[LibraryClassName, ModuleType]\r
-                if LibraryPath is None or LibraryPath == "":\r
-                    LibraryPath = M.LibraryClasses[LibraryClassName]\r
-                    if LibraryPath is None or LibraryPath == "":\r
+                LibraryPath = Platform.Modules[str(Module)].LibraryClasses.get(LibraryClassName,Platform.LibraryClasses[LibraryClassName, ModuleType])\r
+                if LibraryPath is None:\r
+                    LibraryPath = M.LibraryClasses.get(LibraryClassName)\r
+                    if LibraryPath is None:\r
                         if FileName:\r
                             EdkLogger.error("build", RESOURCE_NOT_AVAILABLE,\r
                                             "Instance of library class [%s] is not found" % LibraryClassName,\r