def _validate_writable(self): if not self.is_writable: raise exception.BankReadonlyViolation()
def get_sub_section(self, prefix, is_writable=True): if is_writable and not self._is_writable: raise exception.BankReadonlyViolation() return BankSection(self._bank, self._prefix + '/' + prefix, self._is_writable)