]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Trim/Trim.py
BaseTools: Adjust the spaces around commas and colons
[mirror_edk2.git] / BaseTools / Source / Python / Trim / Trim.py
index b512d15243f83225457b2dc099ac0c026142a5ed..97f4e87587ee15f47a1930d563bc5a5b16daac77 100644 (file)
@@ -261,7 +261,7 @@ def TrimPreprocessedVfr(Source, Target):
     CreateDirectory(os.path.dirname(Target))\r
     \r
     try:\r
-        f = open (Source,'r')\r
+        f = open (Source, 'r')\r
     except:\r
         EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Source)\r
     # read whole file\r
@@ -310,7 +310,7 @@ def TrimPreprocessedVfr(Source, Target):
 \r
     # save all lines trimmed\r
     try:\r
-        f = open (Target,'w')\r
+        f = open (Target, 'w')\r
     except:\r
         EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Target)\r
     f.writelines(Lines)\r
@@ -407,7 +407,7 @@ def TrimAslFile(Source, Target, IncludePathFile):
     if IncludePathFile:\r
         try:\r
             LineNum = 0\r
-            for Line in open(IncludePathFile,'r'):\r
+            for Line in open(IncludePathFile, 'r'):\r
                 LineNum += 1\r
                 if Line.startswith("/I") or Line.startswith ("-I"):\r
                     IncludePathList.append(Line[2:].strip())\r
@@ -425,7 +425,7 @@ def TrimAslFile(Source, Target, IncludePathFile):
 \r
     # save all lines trimmed\r
     try:\r
-        f = open (Target,'w')\r
+        f = open (Target, 'w')\r
     except:\r
         EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Target)\r
 \r
@@ -560,7 +560,7 @@ def TrimEdkSourceCode(Source, Target):
     CreateDirectory(os.path.dirname(Target))\r
 \r
     try:\r
-        f = open (Source,'rb')\r
+        f = open (Source, 'rb')\r
     except:\r
         EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Source)\r
     # read whole file\r
@@ -568,7 +568,7 @@ def TrimEdkSourceCode(Source, Target):
     f.close()\r
 \r
     NewLines = None\r
-    for Re,Repl in gImportCodePatterns:\r
+    for Re, Repl in gImportCodePatterns:\r
         if NewLines is None:\r
             NewLines = Re.sub(Repl, Lines)\r
         else:\r
@@ -579,7 +579,7 @@ def TrimEdkSourceCode(Source, Target):
         return\r
 \r
     try:\r
-        f = open (Target,'wb')\r
+        f = open (Target, 'wb')\r
     except:\r
         EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Target)\r
     f.write(NewLines)\r