Explorar el Código

Avoid unnecessary re-opening of index files during pack close.

Jelmer Vernooij hace 11 años
padre
commit
3e8799a271
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      dulwich/pack.py

+ 2 - 1
dulwich/pack.py

@@ -1802,7 +1802,8 @@ class Pack(object):
     def close(self):
         if self._data is not None:
             self._data.close()
-        self.index.close()
+        if self._idx is not None:
+            self._idx.close()
 
     def __eq__(self, other):
         return type(self) == type(other) and self.index == other.index