summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source
diff options
context:
space:
mode:
authorYingke Liu <yingke.d.liu@intel.com>2015-06-23 06:52:12 +0000
committeryingke <yingke@Edk2>2015-06-23 06:52:12 +0000
commit45265a86142fe8259d2b2ba279b1b7b0da814993 (patch)
tree25db0d7767797dc487e1ef78ae615f6430a81898 /BaseTools/Source
parent09ae0f111332895581084907d14353fe546a5b3a (diff)
downloadedk2-45265a86142fe8259d2b2ba279b1b7b0da814993.tar.gz
edk2-45265a86142fe8259d2b2ba279b1b7b0da814993.tar.bz2
edk2-45265a86142fe8259d2b2ba279b1b7b0da814993.zip
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 <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17680 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source')
-rw-r--r--BaseTools/Source/Python/AutoGen/UniClassObject.py4
1 files changed, 2 insertions, 2 deletions
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()
#