浏览代码

[object_store] Simplify evasive action for repacked store

Signed-off-by: Earl Chew <earl_chew@yahoo.com>
Earl Chew 7 年之前
父节点
当前提交
ce4e3e534f
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      dulwich/object_store.py

+ 1 - 4
dulwich/object_store.py

@@ -365,10 +365,7 @@ class PackBasedObjectStore(BaseObjectStore):
         # consolidated pack.
 
         consolidated = self.add_objects(objects)
-        try:
-            del old_packs[consolidated.name()]
-        except KeyError:
-            pass
+        old_packs.pop(consolidated.name(), None)
 
         for obj in loose_objects:
             self._remove_loose_object(obj.id)