summaryrefslogtreecommitdiff
path: root/git/index
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-04-08 10:13:50 +0200
committerSebastian Thiel <byronimo@gmail.com>2015-04-08 10:13:50 +0200
commit98f6995bdcbd10ea0387d0c55cb6351b81a857fd (patch)
treea4b06147df71c9956ba57a90820e9aed48de3b5e /git/index
parent8f043d8a1d7f4076350ff0c778bfa60f7aa2f7aa (diff)
downloadgitpython-98f6995bdcbd10ea0387d0c55cb6351b81a857fd.tar.gz
fix(index): _store_path() now closes it's stream
This should prevent a resource warning given in py3 Fixes #263
Diffstat (limited to 'git/index')
-rw-r--r--git/index/base.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/git/index/base.py b/git/index/base.py
index 0553f418..10de3358 100644
--- a/git/index/base.py
+++ b/git/index/base.py
@@ -579,6 +579,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
fprogress(filepath, False, filepath)
istream = self.repo.odb.store(IStream(Blob.type, st.st_size, stream))
fprogress(filepath, True, filepath)
+ stream.close()
return BaseIndexEntry((stat_mode_to_index_mode(st.st_mode),
istream.binsha, 0, to_native_path_linux(filepath)))