]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: cleanup LongFilePathSupport usage
authorJaben Carsey <jaben.carsey@intel.com>
Fri, 16 Nov 2018 15:38:21 +0000 (23:38 +0800)
committerBobCF <bob.c.feng@intel.com>
Thu, 6 Dec 2018 09:10:27 +0000 (17:10 +0800)
1) remove an identical function and import it from Common.LongFilePathSupport
2) remove an import that is not needed/used.

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 : Bob Feng <bob.c.feng@intel.com>

BaseTools/Source/Python/AutoGen/UniClassObject.py
BaseTools/Source/Python/build/build.py

index 384f31b165de08222f36e8f5330549ec7182da7e..764d95ec660b750ec69134bcaf03c30ab04bf157 100644 (file)
@@ -24,7 +24,7 @@ from io import BytesIO
 from Common.BuildToolError import *\r
 from Common.StringUtils import GetLineNo\r
 from Common.Misc import PathClass\r
-from Common.LongFilePathSupport import LongFilePath\r
+from Common.LongFilePathSupport import LongFilePath, UniToStr\r
 from Common.GlobalData import *\r
 ##\r
 # Static definitions\r
@@ -46,18 +46,6 @@ BACK_SLASH_PLACEHOLDER = u'\u0006'
 \r
 gIncludePattern = re.compile("^#include +[\"<]+([^\"< >]+)[>\"]+$", re.MULTILINE | re.UNICODE)\r
 \r
-## Convert a python unicode string to a normal string\r
-#\r
-# Convert a python unicode string to a normal string\r
-# UniToStr(u'I am a string') is 'I am a string'\r
-#\r
-# @param Uni:  The python unicode string\r
-#\r
-# @retval:     The formatted normal string\r
-#\r
-def UniToStr(Uni):\r
-    return repr(Uni)[2:-1]\r
-\r
 ## Convert a unicode string to a Hex list\r
 #\r
 # Convert a unicode string to a Hex list\r
index d74082fc2666154ae59293b66dd770107a3cba7c..5eeb626cfbbb1825a40c4ee3f2a6e2ad1528396e 100644 (file)
@@ -36,7 +36,6 @@ from subprocess import *
 from Common import Misc as Utils\r
 \r
 from Common.LongFilePathSupport import OpenLongFilePath as open\r
-from Common.LongFilePathSupport import LongFilePath\r
 from Common.TargetTxtClassObject import *\r
 from Common.ToolDefClassObject import *\r
 from Common.DataType import *\r