* Re: [Patch v1 1/1] BaseTools: cleanup LongFilePathSupport usage
2018-11-16 15:38 ` [Patch v1 1/1] BaseTools: cleanup LongFilePathSupport usage Jaben Carsey
@ 2018-11-27 18:03 ` Carsey, Jaben
2018-11-28 7:35 ` Feng, Bob C
1 sibling, 0 replies; 3+ messages in thread
From: Carsey, Jaben @ 2018-11-27 18:03 UTC (permalink / raw)
To: Carsey, Jaben, edk2-devel@lists.01.org; +Cc: Gao, Liming, Zhu, Yonghong
Poke. Any comments on this one?
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Jaben Carsey
> Sent: Friday, November 16, 2018 7:38 AM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>
> Subject: [edk2] [Patch v1 1/1] BaseTools: cleanup LongFilePathSupport usage
>
> 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>
> ---
> BaseTools/Source/Python/AutoGen/UniClassObject.py | 14 +-------------
> BaseTools/Source/Python/build/build.py | 1 -
> 2 files changed, 1 insertion(+), 14 deletions(-)
>
> diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py
> b/BaseTools/Source/Python/AutoGen/UniClassObject.py
> index 384f31b165de..764d95ec660b 100644
> --- a/BaseTools/Source/Python/AutoGen/UniClassObject.py
> +++ b/BaseTools/Source/Python/AutoGen/UniClassObject.py
> @@ -24,7 +24,7 @@ from io import BytesIO
> from Common.BuildToolError import *
> from Common.StringUtils import GetLineNo
> from Common.Misc import PathClass
> -from Common.LongFilePathSupport import LongFilePath
> +from Common.LongFilePathSupport import LongFilePath, UniToStr
> from Common.GlobalData import *
> ##
> # Static definitions
> @@ -46,18 +46,6 @@ BACK_SLASH_PLACEHOLDER = u'\u0006'
>
> gIncludePattern = re.compile("^#include +[\"<]+([^\"< >]+)[>\"]+$",
> re.MULTILINE | re.UNICODE)
>
> -## Convert a python unicode string to a normal string
> -#
> -# Convert a python unicode string to a normal string
> -# UniToStr(u'I am a string') is 'I am a string'
> -#
> -# @param Uni: The python unicode string
> -#
> -# @retval: The formatted normal string
> -#
> -def UniToStr(Uni):
> - return repr(Uni)[2:-1]
> -
> ## Convert a unicode string to a Hex list
> #
> # Convert a unicode string to a Hex list
> diff --git a/BaseTools/Source/Python/build/build.py
> b/BaseTools/Source/Python/build/build.py
> index d74082fc2666..5eeb626cfbbb 100644
> --- a/BaseTools/Source/Python/build/build.py
> +++ b/BaseTools/Source/Python/build/build.py
> @@ -36,7 +36,6 @@ from subprocess import *
> from Common import Misc as Utils
>
> from Common.LongFilePathSupport import OpenLongFilePath as open
> -from Common.LongFilePathSupport import LongFilePath
> from Common.TargetTxtClassObject import *
> from Common.ToolDefClassObject import *
> from Common.DataType import *
> --
> 2.16.2.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch v1 1/1] BaseTools: cleanup LongFilePathSupport usage
2018-11-16 15:38 ` [Patch v1 1/1] BaseTools: cleanup LongFilePathSupport usage Jaben Carsey
2018-11-27 18:03 ` Carsey, Jaben
@ 2018-11-28 7:35 ` Feng, Bob C
1 sibling, 0 replies; 3+ messages in thread
From: Feng, Bob C @ 2018-11-28 7:35 UTC (permalink / raw)
To: Carsey, Jaben, edk2-devel@lists.01.org; +Cc: Gao, Liming
Reviewed-by : Bob Feng <bob.c.feng@intel.com>
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jaben Carsey
Sent: Friday, November 16, 2018 11:38 PM
To: edk2-devel@lists.01.org
Cc: Gao, Liming <liming.gao@intel.com>
Subject: [edk2] [Patch v1 1/1] BaseTools: cleanup LongFilePathSupport usage
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>
---
BaseTools/Source/Python/AutoGen/UniClassObject.py | 14 +-------------
BaseTools/Source/Python/build/build.py | 1 -
2 files changed, 1 insertion(+), 14 deletions(-)
diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py b/BaseTools/Source/Python/AutoGen/UniClassObject.py
index 384f31b165de..764d95ec660b 100644
--- a/BaseTools/Source/Python/AutoGen/UniClassObject.py
+++ b/BaseTools/Source/Python/AutoGen/UniClassObject.py
@@ -24,7 +24,7 @@ from io import BytesIO from Common.BuildToolError import * from Common.StringUtils import GetLineNo from Common.Misc import PathClass -from Common.LongFilePathSupport import LongFilePath
+from Common.LongFilePathSupport import LongFilePath, UniToStr
from Common.GlobalData import *
##
# Static definitions
@@ -46,18 +46,6 @@ BACK_SLASH_PLACEHOLDER = u'\u0006'
gIncludePattern = re.compile("^#include +[\"<]+([^\"< >]+)[>\"]+$", re.MULTILINE | re.UNICODE)
-## Convert a python unicode string to a normal string -# -# Convert a python unicode string to a normal string -# UniToStr(u'I am a string') is 'I am a string'
-#
-# @param Uni: The python unicode string -#
-# @retval: The formatted normal string
-#
-def UniToStr(Uni):
- return repr(Uni)[2:-1]
-
## Convert a unicode string to a Hex list # # Convert a unicode string to a Hex list diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index d74082fc2666..5eeb626cfbbb 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -36,7 +36,6 @@ from subprocess import * from Common import Misc as Utils
from Common.LongFilePathSupport import OpenLongFilePath as open -from Common.LongFilePathSupport import LongFilePath from Common.TargetTxtClassObject import * from Common.ToolDefClassObject import * from Common.DataType import *
--
2.16.2.windows.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread