diff options
author | Jaben Carsey <jaben.carsey@intel.com> | 2018-05-18 08:06:52 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-06-13 09:02:56 +0800 |
commit | caf744956d4c8c0ef358bdc3df2cdb10265c2ea8 (patch) | |
tree | 2b3f1991e58f949b1fb34a4948a74ca60e4d1dd7 /BaseTools/Source/Python/Common | |
parent | c14b58614ffb992dfc668966a19becb86614aafc (diff) | |
download | edk2-caf744956d4c8c0ef358bdc3df2cdb10265c2ea8.tar.gz edk2-caf744956d4c8c0ef358bdc3df2cdb10265c2ea8.tar.bz2 edk2-caf744956d4c8c0ef358bdc3df2cdb10265c2ea8.zip |
BaseTools: Cleanup unneeded code
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Common')
-rw-r--r-- | BaseTools/Source/Python/Common/Misc.py | 2 | ||||
-rw-r--r-- | BaseTools/Source/Python/Common/StringUtils.py | 2 | ||||
-rw-r--r-- | BaseTools/Source/Python/Common/VpdInfoFile.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py index 90350f8638..24706ebe50 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -1328,7 +1328,7 @@ def ParseFieldValue (Value): try:
Value = "'" + uuid.UUID(Value).get_bytes_le() + "'"
except ValueError, Message:
- raise BadExpression('%s' % Message)
+ raise BadExpression(Message)
Value, Size = ParseFieldValue(Value)
return Value, 16
if Value.startswith('L"') and Value.endswith('"'):
diff --git a/BaseTools/Source/Python/Common/StringUtils.py b/BaseTools/Source/Python/Common/StringUtils.py index 34361ecdd5..2292a263b9 100644 --- a/BaseTools/Source/Python/Common/StringUtils.py +++ b/BaseTools/Source/Python/Common/StringUtils.py @@ -447,7 +447,7 @@ def GetMultipleValuesOfKeyFromLines(Lines, Key, KeyValues, CommentCharacter): for Line in LineList:
Line = CleanString(Line, CommentCharacter)
if Line != '' and Line[0] != CommentCharacter:
- KeyValues += [Line]
+ KeyValues.append(Line)
return True
diff --git a/BaseTools/Source/Python/Common/VpdInfoFile.py b/BaseTools/Source/Python/Common/VpdInfoFile.py index 32895deb5d..2b447772ea 100644 --- a/BaseTools/Source/Python/Common/VpdInfoFile.py +++ b/BaseTools/Source/Python/Common/VpdInfoFile.py @@ -246,7 +246,7 @@ def CallExtenalBPDGTool(ToolPath, VpdFileName): stderr= subprocess.PIPE,
shell=True)
except Exception, X:
- EdkLogger.error("BPDG", BuildToolError.COMMAND_FAILURE, ExtraData="%s" % (str(X)))
+ EdkLogger.error("BPDG", BuildToolError.COMMAND_FAILURE, ExtraData=str(X))
(out, error) = PopenObject.communicate()
print out
while PopenObject.returncode is None :
|