From 45265a86142fe8259d2b2ba279b1b7b0da814993 Mon Sep 17 00:00:00 2001 From: Yingke Liu Date: Tue, 23 Jun 2015 06:52:12 +0000 Subject: BaseTools: Fix a bug that UNI file can't have comment after #include "file.uni" The 'include' regular expression cannot match spaces before or after this statement. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17680 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Source/Python/AutoGen/UniClassObject.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'BaseTools') diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py b/BaseTools/Source/Python/AutoGen/UniClassObject.py index aa54f4fbd6..f900eac1d9 100644 --- a/BaseTools/Source/Python/AutoGen/UniClassObject.py +++ b/BaseTools/Source/Python/AutoGen/UniClassObject.py @@ -293,8 +293,8 @@ class UniFileClassObject(object): if ((Line.count(u'"', 0, CommentPos) - Line.count(u'\\"', 0, CommentPos)) & 1) == 1: CommentPos = Line.find (Comment, CommentPos + 1) else: - return Line[:CommentPos] - return Line + return Line[:CommentPos].strip() + return Line.strip() # -- cgit v1.2.3