summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/Common/Parsing.py
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/Common/Parsing.py')
-rw-r--r--BaseTools/Source/Python/Common/Parsing.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/BaseTools/Source/Python/Common/Parsing.py b/BaseTools/Source/Python/Common/Parsing.py
index 6ab91fbc33..3884b0521c 100644
--- a/BaseTools/Source/Python/Common/Parsing.py
+++ b/BaseTools/Source/Python/Common/Parsing.py
@@ -291,17 +291,17 @@ def QueryInfItem(Table, Model, BelongsToItem):
# @retval truple() A truple structure as (Family, ToolChain, Flag)
#
def GetBuildOption(String, File, LineNo = -1):
+ (Family, ToolChain, Flag) = ('', '', '')
if String.find(TAB_EQUAL_SPLIT) < 0:
RaiseParserError(String, 'BuildOptions', File, '[<Family>:]<ToolFlag>=Flag', LineNo)
- (Family, ToolChain, Flag) = ('', '', '')
- List = GetSplitValueList(String, TAB_EQUAL_SPLIT, MaxSplit = 1)
- if List[0].find(':') > -1:
- Family = List[0][ : List[0].find(':')].strip()
- ToolChain = List[0][List[0].find(':') + 1 : ].strip()
else:
- ToolChain = List[0].strip()
- Flag = List[1].strip()
-
+ List = GetSplitValueList(String, TAB_EQUAL_SPLIT, MaxSplit = 1)
+ if List[0].find(':') > -1:
+ Family = List[0][ : List[0].find(':')].strip()
+ ToolChain = List[0][List[0].find(':') + 1 : ].strip()
+ else:
+ ToolChain = List[0].strip()
+ Flag = List[1].strip()
return (Family, ToolChain, Flag)
## Get Library Class