From 99f5fa449ce1aaa5896819d43164e62fcaac06a0 Mon Sep 17 00:00:00 2001
From: Michael Hanselmann <hansmi@google.com>
Date: Tue, 5 Feb 2013 16:42:09 +0100
Subject: [PATCH] QA: Remove dictionary-like interface from config objects

These are no longer used.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
---
 qa/qa_config.py | 38 --------------------------------------
 1 file changed, 38 deletions(-)

diff --git a/qa/qa_config.py b/qa/qa_config.py
index 6c5e27ea0..f85d940a4 100644
--- a/qa/qa_config.py
+++ b/qa/qa_config.py
@@ -70,24 +70,6 @@ class _QaInstance(object):
 
     return cls(name=data["name"], nicmac=nicmac)
 
-  def __getitem__(self, key):
-    """Legacy dict-like interface.
-
-    """
-    if key == "name":
-      return self.name
-    else:
-      raise KeyError(key)
-
-  def get(self, key, default):
-    """Legacy dict-like interface.
-
-    """
-    try:
-      return self[key]
-    except KeyError:
-      return default
-
   def Release(self):
     """Releases instance and makes it available again.
 
@@ -137,26 +119,6 @@ class _QaNode(object):
     """
     return cls(primary=data["primary"], secondary=data.get("secondary"))
 
-  def __getitem__(self, key):
-    """Legacy dict-like interface.
-
-    """
-    if key == "primary":
-      return self.primary
-    elif key == "secondary":
-      return self.secondary
-    else:
-      raise KeyError(key)
-
-  def get(self, key, default):
-    """Legacy dict-like interface.
-
-    """
-    try:
-      return self[key]
-    except KeyError:
-      return default
-
   def Use(self):
     """Marks a node as being in use.
 
-- 
GitLab