X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FCommon%2FDictionary.py;h=1c33fefabf986d86db96e95c9cf252d45ec4a026;hb=47fea6afd74af76c7e2a2b03d319b7ac035ac26a;hp=5300a5456c1e3b81119a253d38c25dd3214cc20e;hpb=9913dce8aeb8c154ccea23be0835b2c50a8613b4;p=mirror_edk2.git diff --git a/BaseTools/Source/Python/Common/Dictionary.py b/BaseTools/Source/Python/Common/Dictionary.py index 5300a5456c..1c33fefabf 100644 --- a/BaseTools/Source/Python/Common/Dictionary.py +++ b/BaseTools/Source/Python/Common/Dictionary.py @@ -27,19 +27,19 @@ from Common.LongFilePathSupport import OpenLongFilePath as open # def ConvertTextFileToDictionary(FileName, Dictionary, CommentCharacter, KeySplitCharacter, ValueSplitFlag, ValueSplitCharacter): try: - F = open(FileName,'r') + F = open(FileName, 'r') Keys = [] for Line in F: if Line.startswith(CommentCharacter): continue - LineList = Line.split(KeySplitCharacter,1) + LineList = Line.split(KeySplitCharacter, 1) if len(LineList) >= 2: Key = LineList[0].split() if len(Key) == 1 and Key[0][0] != CommentCharacter and Key[0] not in Keys: if ValueSplitFlag: - Dictionary[Key[0]] = LineList[1].replace('\\','/').split(ValueSplitCharacter) + Dictionary[Key[0]] = LineList[1].replace('\\', '/').split(ValueSplitCharacter) else: - Dictionary[Key[0]] = LineList[1].strip().replace('\\','/') + Dictionary[Key[0]] = LineList[1].strip().replace('\\', '/') Keys += [Key[0]] F.close() return 0