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 0EDBF2194D387 for ; Thu, 24 Jan 2019 08:14:26 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2019 08:14:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,517,1539673200"; d="scan'208";a="121005828" Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.149]) by orsmga003.jf.intel.com with ESMTP; 24 Jan 2019 08:14:24 -0800 From: Jaben Carsey To: edk2-devel@lists.01.org Cc: Bob Feng , Liming Gao Date: Thu, 24 Jan 2019 08:14:19 -0800 Message-Id: X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: References: In-Reply-To: References: Subject: [Patch v1 2/4] BaseTools/Common/Misc: remove uncalled code 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: Thu, 24 Jan 2019 16:14:26 -0000 X-List-Received-Date: Thu, 24 Jan 2019 16:14:26 -0000 X-List-Received-Date: Thu, 24 Jan 2019 16:14:26 -0000 X-List-Received-Date: Thu, 24 Jan 2019 16:14:26 -0000 X-List-Received-Date: Thu, 24 Jan 2019 16:14:26 -0000 X-List-Received-Date: Thu, 24 Jan 2019 16:14:26 -0000 X-List-Received-Date: Thu, 24 Jan 2019 16:14:26 -0000 X-List-Received-Date: Thu, 24 Jan 2019 16:14:26 -0000 X-List-Received-Date: Thu, 24 Jan 2019 16:14:26 -0000 X-List-Received-Date: Thu, 24 Jan 2019 16:14:26 -0000 X-List-Received-Date: Thu, 24 Jan 2019 16:14:26 -0000 X-List-Received-Date: Thu, 24 Jan 2019 16:14:26 -0000 X-List-Received-Date: Thu, 24 Jan 2019 16:14:26 -0000 no use for this code content. Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/Misc.py | 46 -------------------- 1 file changed, 46 deletions(-) diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py index c547c2f8e43a..65ccba36b2e9 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -947,44 +947,6 @@ class sdict(IterableUserDict): for k, v in kwargs.items(): self[k] = v -## Dictionary with restricted keys -# -class rdict(dict): - ## Constructor - def __init__(self, KeyList): - for Key in KeyList: - dict.__setitem__(self, Key, "") - - ## []= operator - def __setitem__(self, key, value): - if key not in self: - EdkLogger.error("RestrictedDict", ATTRIBUTE_SET_FAILURE, "Key [%s] is not allowed" % key, - ExtraData=", ".join(dict.keys(self))) - dict.__setitem__(self, key, value) - - ## =[] operator - def __getitem__(self, key): - if key not in self: - return "" - return dict.__getitem__(self, key) - - ## del operator - def __delitem__(self, key): - EdkLogger.error("RestrictedDict", ATTRIBUTE_ACCESS_DENIED, ExtraData="del") - - ## Empty the dict - def clear(self): - for Key in self: - self.__setitem__(Key, "") - - ## Return value related to a key, and remove the (key, value) from the dict - def pop(self, key, *dv): - EdkLogger.error("RestrictedDict", ATTRIBUTE_ACCESS_DENIED, ExtraData="pop") - - ## Return (key, value) pair, and remove the (key, value) from the dict - def popitem(self): - EdkLogger.error("RestrictedDict", ATTRIBUTE_ACCESS_DENIED, ExtraData="popitem") - ## Dictionary using prioritized list as key # class tdict: @@ -1987,11 +1949,3 @@ def CopyDict(ori_dict): # def RemoveCComments(ctext): return re.sub('//.*?\n|/\*.*?\*/', '\n', ctext, flags=re.S) -## -# -# This acts like the main() function for the script, unless it is 'import'ed into another -# script. -# -if __name__ == '__main__': - pass - -- 2.16.2.windows.1