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.20; helo=mga02.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 1D1BE2118B7BA for ; Fri, 16 Nov 2018 07:38:25 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Nov 2018 07:38:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,240,1539673200"; d="scan'208";a="91720511" Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.149]) by orsmga006.jf.intel.com with ESMTP; 16 Nov 2018 07:38:25 -0800 From: Jaben Carsey To: edk2-devel@lists.01.org Cc: Liming Gao , Yonghong Zhu Date: Fri, 16 Nov 2018 07:38:21 -0800 Message-Id: <3a9ca307682f748e567e496d5370c30d8f609105.1542382689.git.jaben.carsey@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: References: Subject: [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: Fri, 16 Nov 2018 15:38:26 -0000 1) remove an identical function and import it from Common.LongFilePathSupport 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 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