Skip to content

Commit 98f6995

Browse files
committed
fix(index): _store_path() now closes it's stream
This should prevent a resource warning given in py3 Fixes #263
1 parent 8f043d8 commit 98f6995

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: git/index/base.py

+1
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@ def _store_path(self, filepath, fprogress):
579579
fprogress(filepath, False, filepath)
580580
istream = self.repo.odb.store(IStream(Blob.type, st.st_size, stream))
581581
fprogress(filepath, True, filepath)
582+
stream.close()
582583
return BaseIndexEntry((stat_mode_to_index_mode(st.st_mode),
583584
istream.binsha, 0, to_native_path_linux(filepath)))
584585

0 commit comments

Comments
 (0)