summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/TargetTool
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/TargetTool
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/TargetTool')
-rw-r--r--BaseTools/Source/Python/TargetTool/TargetTool.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/BaseTools/Source/Python/TargetTool/TargetTool.py b/BaseTools/Source/Python/TargetTool/TargetTool.py
index 0d4a59198e..ed567b8708 100644
--- a/BaseTools/Source/Python/TargetTool/TargetTool.py
+++ b/BaseTools/Source/Python/TargetTool/TargetTool.py
@@ -59,11 +59,11 @@ class TargetTool():
def ConvertTextFileToDict(self, FileName, CommentCharacter, KeySplitCharacter):
"""Convert a text file to a dictionary of (name:value) pairs."""
try:
- f = open(FileName,'r')
+ f = open(FileName, 'r')
for Line in f:
if Line.startswith(CommentCharacter) or Line.strip() == '':
continue
- LineList = Line.split(KeySplitCharacter,1)
+ LineList = Line.split(KeySplitCharacter, 1)
if len(LineList) >= 2:
Key = LineList[0].strip()
if Key.startswith(CommentCharacter) == False and Key in self.TargetTxtDictionary:
@@ -103,7 +103,7 @@ class TargetTool():
if Line.startswith(CommentCharacter) or Line.strip() == '':
fw.write(Line)
else:
- LineList = Line.split(KeySplitCharacter,1)
+ LineList = Line.split(KeySplitCharacter, 1)
if len(LineList) >= 2:
Key = LineList[0].strip()
if Key.startswith(CommentCharacter) == False and Key in self.TargetTxtDictionary:
@@ -202,14 +202,14 @@ def RangeCheckCallback(option, opt_str, value, parser):
parser.error("Option %s only allows one instance in command line!" % option)
def MyOptionParser():
- parser = OptionParser(version=__version__,prog="TargetTool.exe",usage=__usage__,description=__copyright__)
- parser.add_option("-a", "--arch", action="append", type="choice", choices=['IA32','X64','IPF','EBC', 'ARM', 'AARCH64','0'], dest="TARGET_ARCH",
+ parser = OptionParser(version=__version__, prog="TargetTool.exe", usage=__usage__, description=__copyright__)
+ parser.add_option("-a", "--arch", action="append", type="choice", choices=['IA32', 'X64', 'IPF', 'EBC', 'ARM', 'AARCH64', '0'], dest="TARGET_ARCH",
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.")
parser.add_option("-p", "--platform", action="callback", type="string", dest="DSCFILE", callback=SingleCheckCallback,
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.")
parser.add_option("-c", "--tooldef", action="callback", type="string", dest="TOOL_DEFINITION_FILE", callback=SingleCheckCallback,
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.")
- parser.add_option("-t", "--target", action="append", type="choice", choices=['DEBUG','RELEASE','0'], dest="TARGET",
+ parser.add_option("-t", "--target", action="append", type="choice", choices=['DEBUG', 'RELEASE', '0'], dest="TARGET",
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.")
parser.add_option("-n", "--tagname", action="callback", type="string", dest="TOOL_CHAIN_TAG", callback=SingleCheckCallback,
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.")