Fix python directory key error in case build rule family is not defined.
authorqhuang8 <qhuang8@7335b38e-4728-0410-8992-fb3ffe349368>
Wed, 22 Jul 2009 09:45:10 +0000 (09:45 +0000)
committerqhuang8 <qhuang8@7335b38e-4728-0410-8992-fb3ffe349368>
Wed, 22 Jul 2009 09:45:10 +0000 (09:45 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1667 7335b38e-4728-0410-8992-fb3ffe349368

Source/Python/AutoGen/AutoGen.py

index 5e816de..ca95744 100755 (executable)
@@ -1071,7 +1071,7 @@ class PlatformAutoGen(AutoGen):
             # if tool chain family doesn't match, skip it
             if Family != "":
                 FamilyIsNull = False
-                if self.ToolDefinition[Tool][TAB_TOD_DEFINES_BUILDRULEFAMILY] != "":
+                if self.ToolDefinition[Tool].get(TAB_TOD_DEFINES_BUILDRULEFAMILY, "") != "":
                     if Family != self.ToolDefinition[Tool][TAB_TOD_DEFINES_BUILDRULEFAMILY]:
                         continue
                 elif Family != self.ToolDefinition[Tool][TAB_TOD_DEFINES_FAMILY]: