Beispiel #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()
Beispiel #2
0
 def __init__(self, msg):
     NotSupported.__init__(self, 'read', msg)
Beispiel #3
0
 def __init__(self, msg):
     NotSupported.__init__(self, 'write', msg)
Beispiel #4
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)
Beispiel #5
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)
 def __init__(self, msg):
     NotSupported.__init__(self, 'read', msg)
 def __init__(self, msg):
     NotSupported.__init__(self, 'write', msg)