public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Jaben Carsey <jaben.carsey@intel.com>
To: edk2-devel@lists.01.org
Cc: Bob Feng <bob.c.feng@intel.com>, Liming Gao <liming.gao@intel.com>
Subject: [Patch v1 2/4] BaseTools/Common/Misc: remove uncalled code
Date: Thu, 24 Jan 2019 08:14:19 -0800	[thread overview]
Message-ID: <a43170d4254958412bb4e8e0b014f7b358a87d03.1548270790.git.jaben.carsey@intel.com> (raw)
In-Reply-To: <cover.1548270790.git.jaben.carsey@intel.com>
In-Reply-To: <cover.1548270790.git.jaben.carsey@intel.com>

no use for this code content.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
---
 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



  parent reply	other threads:[~2019-01-24 16:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-24 16:14 [Patch v1 0/4] Cleanup the Common.misc file Jaben Carsey
2019-01-24 16:14 ` [Patch v1 1/4] BaseTools/Common/Misc: move private functions Jaben Carsey
2019-01-28  3:45   ` Feng, Bob C
2019-01-24 16:14 ` Jaben Carsey [this message]
2019-01-28  3:45   ` [Patch v1 2/4] BaseTools/Common/Misc: remove uncalled code Feng, Bob C
2019-01-24 16:14 ` [Patch v1 3/4] BaseTools/Common/Misc: Cleanup the imports Jaben Carsey
2019-01-28  3:45   ` Feng, Bob C
2019-01-24 16:14 ` [Patch v1 4/4] BaseTools/build/build: delete variable Jaben Carsey
2019-01-28  3:45   ` Feng, Bob C

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a43170d4254958412bb4e8e0b014f7b358a87d03.1548270790.git.jaben.carsey@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox