From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 8FB05226462E5 for ; Mon, 12 Mar 2018 07:18:41 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2018 07:25:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,461,1515484800"; d="scan'208";a="181961480" Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga004.jf.intel.com with ESMTP; 12 Mar 2018 07:25:01 -0700 From: Jaben Carsey To: edk2-devel@lists.01.org Cc: Yonghong Zhu , Liming Gao Date: Mon, 12 Mar 2018 07:24:56 -0700 Message-Id: <3ae564bf2ec7946e365383409878d81fa690f67d.1520864219.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: UPT: remove unused variable and inaccessible code. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 14:18:42 -0000 gINCLUDE_PATTERN is never used. IncList is always empty. Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/UPT/Library/UniClassObject.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/BaseTools/Source/Python/UPT/Library/UniClassObject.py b/BaseTools/Source/Python/UPT/Library/UniClassObject.py index 1fbbf2e49887..9408e77484a0 100644 --- a/BaseTools/Source/Python/UPT/Library/UniClassObject.py +++ b/BaseTools/Source/Python/UPT/Library/UniClassObject.py @@ -47,8 +47,6 @@ NULL = u'\u0000' TAB = u'\t' BACK_SPLASH = u'\\' -gINCLUDE_PATTERN = re.compile("^!include[\s]+([\S]+)[\s]*$", re.MULTILINE | re.UNICODE) - gLANG_CONV_TABLE = {'eng':'en', 'fra':'fr', \ 'aar':'aa', 'abk':'ab', 'ave':'ae', 'afr':'af', 'aka':'ak', 'amh':'am', \ 'arg':'an', 'ara':'ar', 'asm':'as', 'ava':'av', 'aym':'ay', 'aze':'az', \ @@ -543,22 +541,6 @@ class UniFileClassObject(object): Line = Line.replace(u'\t', u' ') Line = Line.replace(u'\u0006', u'\\') - # IncList = gINCLUDE_PATTERN.findall(Line) - IncList = [] - if len(IncList) == 1: - for Dir in [File.Dir] + self.IncludePathList: - IncFile = PathClass(str(IncList[0]), Dir) - self.IncFileList.append(IncFile) - if os.path.isfile(IncFile.Path): - Lines.extend(self.PreProcess(IncFile, True)) - break - else: - EdkLogger.Error("Unicode File Parser", - ToolError.FILE_NOT_FOUND, - Message="Cannot find include file", - ExtraData=str(IncList[0])) - continue - # # Check if single line has correct '"' # -- 2.14.1.windows.1