summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsey, Jaben <jaben.carsey@intel.com>2019-01-25 00:14:19 +0800
committerFeng, Bob C <bob.c.feng@intel.com>2019-01-28 11:44:43 +0800
commitfe5ff16128f85545bd0cc40d738a251f2a602464 (patch)
tree82c12df4e35321c8104d6d8bc0c57592a81668ba
parent51f5233385569475e28deab0380976c47c21f5d2 (diff)
downloadedk2-fe5ff16128f85545bd0cc40d738a251f2a602464.tar.gz
edk2-fe5ff16128f85545bd0cc40d738a251f2a602464.tar.bz2
edk2-fe5ff16128f85545bd0cc40d738a251f2a602464.zip
BaseTools/Common/Misc: remove uncalled code
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> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
-rw-r--r--BaseTools/Source/Python/Common/Misc.py46
1 files changed, 0 insertions, 46 deletions
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index c547c2f8e4..65ccba36b2 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
-