]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Common/Misc.py
Sync tool code to BuildTools project r1783.
[mirror_edk2.git] / BaseTools / Source / Python / Common / Misc.py
index 76dfbb665e382844af5a511e669110d96c70018f..2883169f3c6888997e4c028c9a5e5c69d4121d30 100644 (file)
@@ -1125,6 +1125,16 @@ class tdict:
             for Key in self.data:
                 self.data[Key].SetSingleMode()
 
+    def GetKeys(self, KeyIndex=0):
+        assert KeyIndex >= 0
+        if KeyIndex == 0:
+            return set(self.data.keys())
+        else:
+            keys = set()
+            for Key in self.data:
+                keys |= self.data[Key].GetKeys(KeyIndex - 1)
+            return keys
+
 ## Boolean chain list
 #
 class Blist(UserList):