From e978484aa649f3de8f4c38fd1a6ea3abed06c8cf Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Mon, 17 Aug 2009 11:48:28 +0200
Subject: [PATCH] Remove obsolete ConfigObject.__setitem__

__setitem__ is used to emulate container objects. We don't use this, and
the method is not used in a couple of normal operations (add/remove
instance, add/remove disk).

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
---
 lib/objects.py | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/lib/objects.py b/lib/objects.py
index dc58f7ceb..8b200f8a8 100644
--- a/lib/objects.py
+++ b/lib/objects.py
@@ -99,11 +99,6 @@ class ConfigObject(object):
                            (type(self).__name__, name))
     return None
 
-  def __setitem__(self, key, value):
-    if key not in self.__slots__:
-      raise KeyError(key)
-    setattr(self, key, value)
-
   def __setstate__(self, state):
     for name in state:
       if name in self.__slots__:
-- 
GitLab