summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/AutoGen/BuildEngine.py
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2015-12-18 06:43:57 +0000
committervanjeff <vanjeff@Edk2>2015-12-18 06:43:57 +0000
commit253a4b8ccbb4a984189eb29c48c25f6ef266ca80 (patch)
treea2207b2a3a2e6f9a42a5d9262cf616dfa369b727 /BaseTools/Source/Python/AutoGen/BuildEngine.py
parent818e60d95106bd68679bf4be1cef67f0d0af4b6c (diff)
downloadedk2-platforms-253a4b8ccbb4a984189eb29c48c25f6ef266ca80.tar.xz
BaseTools: Clean some coding style issues
This patch clean some coding style issues, majorly for space character. (Sync patch r19080 from main trunk.) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@19369 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/BuildEngine.py')
-rw-r--r--BaseTools/Source/Python/AutoGen/BuildEngine.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/BaseTools/Source/Python/AutoGen/BuildEngine.py b/BaseTools/Source/Python/AutoGen/BuildEngine.py
index ee1d3c89f2..63ed47d94b 100644
--- a/BaseTools/Source/Python/AutoGen/BuildEngine.py
+++ b/BaseTools/Source/Python/AutoGen/BuildEngine.py
@@ -388,7 +388,7 @@ class BuildRule:
# find the build_rule_version
if Line and Line[0] == "#" and Line.find(TAB_BUILD_RULE_VERSION) <> -1:
- if Line.find("=") <> -1 and Line.find("=") < (len(Line)-1) and (Line[(Line.find("=") + 1):]).split():
+ if Line.find("=") <> -1 and Line.find("=") < (len(Line) - 1) and (Line[(Line.find("=") + 1):]).split():
self._FileVersion = (Line[(Line.find("=") + 1):]).split()[0]
# skip empty or comment line
if Line == "" or Line[0] == "#":
@@ -470,16 +470,16 @@ class BuildRule:
if TokenList[0] == "BUILD":
if len(TokenList) == 1:
EdkLogger.error("build", FORMAT_INVALID, "Invalid rule section",
- File=self.RuleFile, Line=LineIndex+1,
+ File=self.RuleFile, Line=LineIndex + 1,
ExtraData=self.RuleContent[LineIndex])
FileType = TokenList[1]
if FileType == '':
EdkLogger.error("build", FORMAT_INVALID, "No file type given",
- File=self.RuleFile, Line=LineIndex+1,
+ File=self.RuleFile, Line=LineIndex + 1,
ExtraData=self.RuleContent[LineIndex])
if self._FileTypePattern.match(FileType) == None:
- EdkLogger.error("build", FORMAT_INVALID, File=self.RuleFile, Line=LineIndex+1,
+ EdkLogger.error("build", FORMAT_INVALID, File=self.RuleFile, Line=LineIndex + 1,
ExtraData="Only character, number (non-first character), '_' and '-' are allowed in file type")
# new format: File-Type.Build-Type.Arch
else:
@@ -488,7 +488,7 @@ class BuildRule:
elif FileType != TokenList[0]:
EdkLogger.error("build", FORMAT_INVALID,
"Different file types are not allowed in the same rule section",
- File=self.RuleFile, Line=LineIndex+1,
+ File=self.RuleFile, Line=LineIndex + 1,
ExtraData=self.RuleContent[LineIndex])
if len(TokenList) > 1:
BuildType = TokenList[1]
@@ -502,12 +502,12 @@ class BuildRule:
if 'COMMON' in self._BuildTypeList and len(self._BuildTypeList) > 1:
EdkLogger.error("build", FORMAT_INVALID,
"Specific build types must not be mixed with common one",
- File=self.RuleFile, Line=LineIndex+1,
+ File=self.RuleFile, Line=LineIndex + 1,
ExtraData=self.RuleContent[LineIndex])
if 'COMMON' in self._ArchList and len(self._ArchList) > 1:
EdkLogger.error("build", FORMAT_INVALID,
"Specific ARCH must not be mixed with common one",
- File=self.RuleFile, Line=LineIndex+1,
+ File=self.RuleFile, Line=LineIndex + 1,
ExtraData=self.RuleContent[LineIndex])
self._FileType = FileType
@@ -531,7 +531,7 @@ class BuildRule:
elif SectionType != Type:
EdkLogger.error("build", FORMAT_INVALID,
"Two different section types are not allowed in the same sub-section",
- File=self.RuleFile, Line=LineIndex+1,
+ File=self.RuleFile, Line=LineIndex + 1,
ExtraData=self.RuleContent[LineIndex])
if len(TokenList) > 1:
@@ -548,10 +548,10 @@ class BuildRule:
if 'COMMON' in FamilyList and len(FamilyList) > 1:
EdkLogger.error("build", FORMAT_INVALID,
"Specific tool chain family should not be mixed with general one",
- File=self.RuleFile, Line=LineIndex+1,
+ File=self.RuleFile, Line=LineIndex + 1,
ExtraData=self.RuleContent[LineIndex])
if self._State not in self._StateHandler:
- EdkLogger.error("build", FORMAT_INVALID, File=self.RuleFile, Line=LineIndex+1,
+ EdkLogger.error("build", FORMAT_INVALID, File=self.RuleFile, Line=LineIndex + 1,
ExtraData="Unknown subsection: %s" % self.RuleContent[LineIndex])
## Parse <InputFile> sub-section
#