Leave __delitem__ unimplemented in filesystem storage

- rename the cleaning method
This commit is contained in:
Peter Šurda 2017-06-21 12:17:40 +02:00
parent 618f3865c1
commit 243025a1aa
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -65,7 +65,7 @@ class FilesystemInventory(InventoryStorage):
self._inventory[value.stream] = {} self._inventory[value.stream] = {}
self._inventory[value.stream][hash] = value self._inventory[value.stream][hash] = value
def __delitem__(self, hash): def delHashId(self, hash):
for stream in self._inventory.keys(): for stream in self._inventory.keys():
try: try:
del self._inventory[stream][hash] del self._inventory[stream][hash]
@ -172,4 +172,4 @@ class FilesystemInventory(InventoryStorage):
if item.expires < minTime: if item.expires < minTime:
deletes.append(hashId) deletes.append(hashId)
for hashId in deletes: for hashId in deletes:
del self[hashId] self.delHashId(hashId)