Sfoglia il codice sorgente

pack.FilePackIndex: use self._file instead of file parameter

As the previous lines show, the file parameter could be unspecified. We
have already handled the case when it is unspecified, with the result in
self._file; so, use it instead of file.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Tay Ray Chuan 15 anni fa
parent
commit
9f9e5eba36
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      dulwich/pack.py

+ 1 - 1
dulwich/pack.py

@@ -346,7 +346,7 @@ class FilePackIndex(PackIndex):
         else:
         else:
             self._file = file
             self._file = file
         if contents is None:
         if contents is None:
-            self._contents, self._size = _load_file_contents(file, size)
+            self._contents, self._size = _load_file_contents(self._file, size)
         else:
         else:
             self._contents, self._size = (contents, size)
             self._contents, self._size = (contents, size)