From bfc8f5667a68071e7f12a9ba2a0cf076b1285107 Mon Sep 17 00:00:00 2001 From: "Carsey, Jaben" Date: Wed, 4 Apr 2018 06:34:06 +0800 Subject: BaseTools: remove redundant check The RegEx matches begining and end of the string, dont then check length. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/IdfClassObject.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BaseTools/Source/Python/AutoGen/IdfClassObject.py') 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]) -- cgit v1.2.3