Revision d2d7d5c3 lib/objects.py

b/lib/objects.py
58 58
  def __init__(self, **kwargs):
59 59
    for k, v in kwargs.iteritems():
60 60
      setattr(self, k, v)
61
    self.UpgradeConfig()
61 62

  
62 63
  def __getattr__(self, name):
63 64
    if name not in self.__slots__:
......
165 166
    """Implement __repr__ for ConfigObjects."""
166 167
    return repr(self.ToDict())
167 168

  
169
  def UpgradeConfig(self):
170
    """Fill defaults for missing configuration values.
171

  
172
    This method will be called at object init time, and its implementation will
173
    be object dependent.
174

  
175
    """
176
    pass
177

  
168 178

  
169 179
class TaggableObject(ConfigObject):
170 180
  """An generic class supporting tags.

Also available in: Unified diff