Changeset View
Changeset View
Standalone View
Standalone View
swh/objstorage/backends/winery/objstorage.py
Show All 32 Lines | def get(self, obj_id: ObjId) -> bytes: | ||||
return self.winery.get(obj_id) | return self.winery.get(obj_id) | ||||
def check_config(self, *, check_write): | def check_config(self, *, check_write): | ||||
return True | return True | ||||
def __contains__(self, obj_id): | def __contains__(self, obj_id): | ||||
return obj_id in self.winery | return obj_id in self.winery | ||||
def add(self, content: bytes, obj_id: ObjId, check_presence: bool = True) -> ObjId: | def add(self, content: bytes, obj_id: ObjId, check_presence: bool = True) -> None: | ||||
return self.winery.add(content, obj_id, check_presence) | self.winery.add(content, obj_id, check_presence) | ||||
def check(self, obj_id: ObjId) -> None: | def check(self, obj_id: ObjId) -> None: | ||||
return self.winery.check(obj_id) | return self.winery.check(obj_id) | ||||
def delete(self, obj_id: ObjId): | def delete(self, obj_id: ObjId): | ||||
raise PermissionError("Delete is not allowed.") | raise PermissionError("Delete is not allowed.") | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |