summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen/IdfClassObject.py
diff options
context:
space:
mode:
authorCarsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben>2018-04-04 06:34:06 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-04-08 15:34:12 +0800
commitbfc8f5667a68071e7f12a9ba2a0cf076b1285107 (patch)
tree8aa0629ffd105d2dac4d7feb0107b1cfbb0ac145 /BaseTools/Source/Python/AutoGen/IdfClassObject.py
parent1f26f5fdb96b4a0010c4388273fc42d551170dd6 (diff)
downloadedk2-bfc8f5667a68071e7f12a9ba2a0cf076b1285107.tar.gz
edk2-bfc8f5667a68071e7f12a9ba2a0cf076b1285107.tar.bz2
edk2-bfc8f5667a68071e7f12a9ba2a0cf076b1285107.zip
BaseTools: remove redundant check
The RegEx matches begining and end of the string, dont then check length. 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/AutoGen/IdfClassObject.py')
-rw-r--r--BaseTools/Source/Python/AutoGen/IdfClassObject.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/AutoGen/IdfClassObject.py b/BaseTools/Source/Python/AutoGen/IdfClassObject.py
index a028aceee9..6953854a52 100644
--- a/BaseTools/Source/Python/AutoGen/IdfClassObject.py
+++ b/BaseTools/Source/Python/AutoGen/IdfClassObject.py
@@ -107,7 +107,7 @@ class IdfFileClassObject(object):
if Len == 4 and LineDetails[2] != 'TRANSPARENT':
EdkLogger.error("Image Definition File Parser", PARSER_ERROR, 'Please use the keyword "TRANSPARENT" to describe the transparency setting in Line %s of File %s.' % (LineNo, File.Path))
MatchString = gIdentifierPattern.match(LineDetails[1])
- if MatchString is None or MatchString.end(0) != len(LineDetails[1]):
+ if MatchString is None:
EdkLogger.error('Image Definition File Parser', FORMAT_INVALID, 'The Image token name %s defined in Idf file %s contains the invalid character.' % (LineDetails[1], File.Path))
if LineDetails[1] not in self.ImageIDList:
self.ImageIDList.append(LineDetails[1])