From ccaa7754a29728df0a7485932aab4909f6be116a Mon Sep 17 00:00:00 2001 From: Gary Lin Date: Mon, 25 Jun 2018 18:31:33 +0800 Subject: BaseTools: Adjust the spaces around commas and colons Based on "futurize -f lib2to3.fixes.fix_ws_comma" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/Common/VpdInfoFile.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'BaseTools/Source/Python/Common/VpdInfoFile.py') diff --git a/BaseTools/Source/Python/Common/VpdInfoFile.py b/BaseTools/Source/Python/Common/VpdInfoFile.py index ddabe9fb25..93175d41e9 100644 --- a/BaseTools/Source/Python/Common/VpdInfoFile.py +++ b/BaseTools/Source/Python/Common/VpdInfoFile.py @@ -88,7 +88,7 @@ class VpdInfoFile: # # @param offset integer value for VPD's offset in specific SKU. # - def Add(self, Vpd, skuname,Offset): + def Add(self, Vpd, skuname, Offset): if (Vpd is None): EdkLogger.error("VpdInfoFile", BuildToolError.ATTRIBUTE_UNKNOWN_ERROR, "Invalid VPD PCD entry.") @@ -140,7 +140,7 @@ class VpdInfoFile: if PcdValue == "" : PcdValue = Pcd.DefaultValue - Content += "%s.%s|%s|%s|%s|%s \n" % (Pcd.TokenSpaceGuidCName, PcdTokenCName, skuname,str(self._VpdArray[Pcd][skuname]).strip(), str(Pcd.MaxDatumSize).strip(),PcdValue) + Content += "%s.%s|%s|%s|%s|%s \n" % (Pcd.TokenSpaceGuidCName, PcdTokenCName, skuname, str(self._VpdArray[Pcd][skuname]).strip(), str(Pcd.MaxDatumSize).strip(), PcdValue) i += 1 return SaveFileOnChange(FilePath, Content, False) @@ -169,8 +169,8 @@ class VpdInfoFile: # the line must follow output format defined in BPDG spec. # try: - PcdName, SkuId,Offset, Size, Value = Line.split("#")[0].split("|") - PcdName, SkuId,Offset, Size, Value = PcdName.strip(), SkuId.strip(),Offset.strip(), Size.strip(), Value.strip() + PcdName, SkuId, Offset, Size, Value = Line.split("#")[0].split("|") + PcdName, SkuId, Offset, Size, Value = PcdName.strip(), SkuId.strip(), Offset.strip(), Size.strip(), Value.strip() TokenSpaceName, PcdTokenName = PcdName.split(".") except: EdkLogger.error("BPDG", BuildToolError.PARSER_ERROR, "Fail to parse VPD information file %s" % FilePath) @@ -179,7 +179,7 @@ class VpdInfoFile: if (TokenSpaceName, PcdTokenName) not in self._VpdInfo: self._VpdInfo[(TokenSpaceName, PcdTokenName)] = [] - self._VpdInfo[(TokenSpaceName, PcdTokenName)].append((SkuId,Offset, Value)) + self._VpdInfo[(TokenSpaceName, PcdTokenName)].append((SkuId, Offset, Value)) for VpdObject in self._VpdArray: VpdObjectTokenCName = VpdObject.TokenCName for PcdItem in GlobalData.MixedPcd: -- cgit v1.2.3