From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 906F42118C51C for ; Tue, 27 Nov 2018 23:35:14 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Nov 2018 23:35:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,289,1539673200"; d="scan'208";a="96104434" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga008.jf.intel.com with ESMTP; 27 Nov 2018 23:35:14 -0800 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 27 Nov 2018 23:35:13 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 27 Nov 2018 23:35:13 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.102]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.46]) with mapi id 14.03.0415.000; Wed, 28 Nov 2018 15:35:11 +0800 From: "Feng, Bob C" To: "Carsey, Jaben" , "edk2-devel@lists.01.org" CC: "Gao, Liming" Thread-Topic: [edk2] [Patch v1 1/1] BaseTools: cleanup LongFilePathSupport usage Thread-Index: AQHUfcJ1HhwkChf5+06P299uDfbxhKVk3j5w Date: Wed, 28 Nov 2018 07:35:10 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D160003130@SHSMSX101.ccr.corp.intel.com> References: <3a9ca307682f748e567e496d5370c30d8f609105.1542382689.git.jaben.carsey@intel.com> In-Reply-To: <3a9ca307682f748e567e496d5370c30d8f609105.1542382689.git.jaben.carsey@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch v1 1/1] BaseTools: cleanup LongFilePathSupport usage X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2018 07:35:14 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by : Bob Feng -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jabe= n Carsey Sent: Friday, November 16, 2018 11:38 PM To: edk2-devel@lists.01.org Cc: Gao, Liming Subject: [edk2] [Patch v1 1/1] BaseTools: cleanup LongFilePathSupport usage 1) remove an identical function and import it from Common.LongFilePathSuppo= rt 2) remove an import that is not needed/used. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- 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 PathC= lass -from Common.LongFilePathSupport import LongFilePath +from Common.LongFilePathSupport import LongFilePath, UniToStr from Common.GlobalData import * ## # Static definitions @@ -46,18 +46,6 @@ BACK_SLASH_PLACEHOLDER =3D u'\u0006' =20 gIncludePattern =3D re.compile("^#include +[\"<]+([^\"< >]+)[>\"]+$", re.M= ULTILINE | re.UNICODE) =20 -## Convert a python unicode string to a normal string -# -# Convert a pyth= on 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 t= o a Hex list diff --git a/BaseTools/Source/Python/build/build.py b/BaseTool= s/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 Util= s =20 from Common.LongFilePathSupport import OpenLongFilePath as open -from Comm= on.LongFilePathSupport import LongFilePath from Common.TargetTxtClassObjec= t import * from Common.ToolDefClassObject import * from Common.DataType i= mport * -- 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel