Fixed an issue which will cause files not found
[people/mcb30/basetools.git] / Source / Python / Workspace / WorkspaceDatabase.py
index 8744cf9..5bf8752 100644 (file)
@@ -1829,13 +1829,10 @@ class WorkspaceDatabase(object):
 \r
     def _GetPackageList(self):\r
         PackageList = []\r
-        for PackageFile in self.TblFile.GetFileList(MODEL_FILE_DEC):\r
-            try:\r
-                Package = self.BuildObject[PackageFile, 'COMMON']\r
-            except:\r
-                Package = None\r
-            if Package != None:\r
-                PackageList.append(Package)\r
+        for Module in self.ModuleList:\r
+            for Package in Module.Packages:\r
+                if Package not in PackageList:\r
+                    PackageList.append(Package)\r
         return PackageList\r
 \r
     def _GetPlatformList(self):\r