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 gitpython-developers#263
1 parent 8f043d8 commit 98f6995

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

git/index/base.py

Lines changed: 1 addition & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy