Reviewed-by: Liming Gao <liming....@intel.com>

-----Original Message-----
From: Yingke Liu [mailto:yingke.d....@intel.com] 
Sent: Friday, June 19, 2015 3:16 PM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] [Patch] 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....@intel.com>
---
 BaseTools/Source/Python/AutoGen/UniClassObject.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py 
b/BaseTools/Source/Python/AutoGen/UniClassObject.py
index aa54f4f..f900eac 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()
                 
 
     #
-- 
1.9.5.msysgit.0


------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to