Exemple #1
0
 def init(self):
     """Create a new storage repository."""
     if self.can_init == False:
         raise NotSupported('init',
                            'Cannot initialize this repository format.')
     if self.is_writeable() == False:
         raise NotWriteable('Cannot initialize unwriteable storage.')
     return self._init()
Exemple #2
0
 def recursive_remove(self, *args, **kwargs):
     """Remove an entry and all its decendents."""
     if self.is_writeable() == False:
         raise NotSupported(
             'write', 'Cannot remove entries from unwriteable storage.')
     self._recursive_remove(*args, **kwargs)
Exemple #3
0
 def remove(self, *args, **kwargs):
     """Remove an entry."""
     if self.is_writeable() == False:
         raise NotSupported(
             'write', 'Cannot remove entry from unwriteable storage.')
     self._remove(*args, **kwargs)