]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/TargetTool/TargetTool.py
BaseTools: Adjust the spaces around commas and colons
[mirror_edk2.git] / BaseTools / Source / Python / TargetTool / TargetTool.py
index 0d4a59198e7bd84a628093fd733894a37d453e4a..ed567b870816dc08578502240f315086f3d04344 100644 (file)
@@ -59,11 +59,11 @@ class TargetTool():
     def ConvertTextFileToDict(self, FileName, CommentCharacter, KeySplitCharacter):\r
         """Convert a text file to a dictionary of (name:value) pairs."""\r
         try:\r
-            f = open(FileName,'r')\r
+            f = open(FileName, 'r')\r
             for Line in f:\r
                 if Line.startswith(CommentCharacter) or Line.strip() == '':\r
                     continue\r
-                LineList = Line.split(KeySplitCharacter,1)\r
+                LineList = Line.split(KeySplitCharacter, 1)\r
                 if len(LineList) >= 2:\r
                     Key = LineList[0].strip()\r
                     if Key.startswith(CommentCharacter) == False and Key in self.TargetTxtDictionary:\r
@@ -103,7 +103,7 @@ class TargetTool():
                 if Line.startswith(CommentCharacter) or Line.strip() == '':\r
                     fw.write(Line)\r
                 else:\r
-                    LineList = Line.split(KeySplitCharacter,1)\r
+                    LineList = Line.split(KeySplitCharacter, 1)\r
                     if len(LineList) >= 2:\r
                         Key = LineList[0].strip()\r
                         if Key.startswith(CommentCharacter) == False and Key in self.TargetTxtDictionary:\r
@@ -202,14 +202,14 @@ def RangeCheckCallback(option, opt_str, value, parser):
         parser.error("Option %s only allows one instance in command line!" % option)\r
         \r
 def MyOptionParser():\r
-    parser = OptionParser(version=__version__,prog="TargetTool.exe",usage=__usage__,description=__copyright__)\r
-    parser.add_option("-a", "--arch", action="append", type="choice", choices=['IA32','X64','IPF','EBC', 'ARM', 'AARCH64','0'], dest="TARGET_ARCH",\r
+    parser = OptionParser(version=__version__, prog="TargetTool.exe", usage=__usage__, description=__copyright__)\r
+    parser.add_option("-a", "--arch", action="append", type="choice", choices=['IA32', 'X64', 'IPF', 'EBC', 'ARM', 'AARCH64', '0'], dest="TARGET_ARCH",\r
         help="ARCHS is one of list: IA32, X64, IPF, ARM, AARCH64 or EBC, which replaces target.txt's TARGET_ARCH definition. To specify more archs, please repeat this option. 0 will clear this setting in target.txt and can't combine with other value.")\r
     parser.add_option("-p", "--platform", action="callback", type="string", dest="DSCFILE", callback=SingleCheckCallback,\r
         help="Specify a DSC file, which replace target.txt's ACTIVE_PLATFORM definition. 0 will clear this setting in target.txt and can't combine with other value.")\r
     parser.add_option("-c", "--tooldef", action="callback", type="string", dest="TOOL_DEFINITION_FILE", callback=SingleCheckCallback,\r
         help="Specify the WORKSPACE relative path of tool_def.txt file, which replace target.txt's TOOL_CHAIN_CONF definition. 0 will clear this setting in target.txt and can't combine with other value.")\r
-    parser.add_option("-t", "--target", action="append", type="choice", choices=['DEBUG','RELEASE','0'], dest="TARGET",\r
+    parser.add_option("-t", "--target", action="append", type="choice", choices=['DEBUG', 'RELEASE', '0'], dest="TARGET",\r
         help="TARGET is one of list: DEBUG, RELEASE, which replaces target.txt's TARGET definition. To specify more TARGET, please repeat this option. 0 will clear this setting in target.txt and can't combine with other value.")\r
     parser.add_option("-n", "--tagname", action="callback", type="string", dest="TOOL_CHAIN_TAG", callback=SingleCheckCallback,\r
         help="Specify the Tool Chain Tagname, which replaces target.txt's TOOL_CHAIN_TAG definition. 0 will clear this setting in target.txt and can't combine with other value.")\r