BaseTools: Clean some coding style issues

This patch clean some coding style issues, majorly for space character.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19080 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Yonghong Zhu
2015-12-01 04:22:16 +00:00
committed by yzhu52
parent 9913dce8ae
commit 47fea6afd7
28 changed files with 557 additions and 557 deletions

View File

@ -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