summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Trim
diff options
context:
space:
mode:
authorGary Lin <glin@suse.com>2018-06-25 18:31:33 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-06-27 16:33:25 +0800
commitccaa7754a29728df0a7485932aab4909f6be116a (patch)
tree38bc70e26055b57ff5adefe0d996fc7e2c9d62b4 /BaseTools/Source/Python/Trim
parentdf29fd130abcc3094b8c5d842e4bfadd91cbf0e8 (diff)
downloadedk2-ccaa7754a29728df0a7485932aab4909f6be116a.tar.gz
edk2-ccaa7754a29728df0a7485932aab4909f6be116a.tar.bz2
edk2-ccaa7754a29728df0a7485932aab4909f6be116a.zip
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 <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Trim')
-rw-r--r--BaseTools/Source/Python/Trim/Trim.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/BaseTools/Source/Python/Trim/Trim.py b/BaseTools/Source/Python/Trim/Trim.py
index b512d15243..97f4e87587 100644
--- a/BaseTools/Source/Python/Trim/Trim.py
+++ b/BaseTools/Source/Python/Trim/Trim.py
@@ -261,7 +261,7 @@ def TrimPreprocessedVfr(Source, Target):
CreateDirectory(os.path.dirname(Target))
try:
- f = open (Source,'r')
+ f = open (Source, 'r')
except:
EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Source)
# read whole file
@@ -310,7 +310,7 @@ def TrimPreprocessedVfr(Source, Target):
# save all lines trimmed
try:
- f = open (Target,'w')
+ f = open (Target, 'w')
except:
EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Target)
f.writelines(Lines)
@@ -407,7 +407,7 @@ def TrimAslFile(Source, Target, IncludePathFile):
if IncludePathFile:
try:
LineNum = 0
- for Line in open(IncludePathFile,'r'):
+ for Line in open(IncludePathFile, 'r'):
LineNum += 1
if Line.startswith("/I") or Line.startswith ("-I"):
IncludePathList.append(Line[2:].strip())
@@ -425,7 +425,7 @@ def TrimAslFile(Source, Target, IncludePathFile):
# save all lines trimmed
try:
- f = open (Target,'w')
+ f = open (Target, 'w')
except:
EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Target)
@@ -560,7 +560,7 @@ def TrimEdkSourceCode(Source, Target):
CreateDirectory(os.path.dirname(Target))
try:
- f = open (Source,'rb')
+ f = open (Source, 'rb')
except:
EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Source)
# read whole file
@@ -568,7 +568,7 @@ def TrimEdkSourceCode(Source, Target):
f.close()
NewLines = None
- for Re,Repl in gImportCodePatterns:
+ for Re, Repl in gImportCodePatterns:
if NewLines is None:
NewLines = Re.sub(Repl, Lines)
else:
@@ -579,7 +579,7 @@ def TrimEdkSourceCode(Source, Target):
return
try:
- f = open (Target,'wb')
+ f = open (Target, 'wb')
except:
EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Target)
f.write(NewLines)