Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite16a004

Browse files
committed
Assure index file descriptor is closed after reader (#1394) (#1395)
A regression that was introduced withd79d20d.
1 parent53d22bb commite16a004

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎git/index/base.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,10 @@ def _set_cache_(self, attr: str) -> None:
135135
returnNone
136136
# END exception handling
137137

138-
stream=file_contents_ro(fd,stream=True,allow_mmap=True)
138+
try:
139+
stream=file_contents_ro(fd,stream=True,allow_mmap=True)
140+
finally:
141+
os.close(fd)
139142

140143
self._deserialize(stream)
141144
else:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp