Commit 47c28c5b authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Implement __setitem__ for ConfigObject to add container protocol compatibility.

parent 6bf0c9bb
......@@ -63,6 +63,11 @@ 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 __getstate__(self):
state = {}
for name in self.__slots__:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment