We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53d22bb commit e16a004Copy full SHA for e16a004
1 file changed
git/index/base.py
@@ -135,7 +135,10 @@ def _set_cache_(self, attr: str) -> None:
135
return None
136
# END exception handling
137
138
- stream = file_contents_ro(fd, stream=True, allow_mmap=True)
+ try:
139
+ stream = file_contents_ro(fd, stream=True, allow_mmap=True)
140
+ finally:
141
+ os.close(fd)
142
143
self._deserialize(stream)
144
else:
0 commit comments