diff options
Diffstat (limited to 'BaseTools/Source/Python/Trim/Trim.py')
-rw-r--r-- | BaseTools/Source/Python/Trim/Trim.py | 14 |
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)
|