12345678910111213141516171819202122232425262728293031323334 |
- class BaseConfig(object):
- section = None
- def __init__(self, config):
- self._global_config = config
- self.config = self._global_config.get(self.section, dict())
- self.pbr_config = config.get('pbr', dict())
- def run(self):
- self.hook()
- self.save()
- def hook(self):
- pass
- def save(self):
- self._global_config[self.section] = self.config
|