Content-Length: 260679 | pFad | http://github.com/gitpython-developers/GitPython/commit/47147406a5931e07641385f27e0e018927044c55

D2 Merge pull request #1639 from skshetry/close-lockfile · gitpython-developers/GitPython@4714740 · GitHub
Skip to content

Commit 4714740

Browse files
authored
Merge pull request #1639 from skshetry/close-lockfile
util: close lockfile after opening successfully
2 parents f882cd8 + 3e829eb commit 4714740

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,8 @@ def _obtain_lock_or_raise(self) -> None:
935935
)
936936

937937
try:
938-
open(lock_file, mode='w', closefd=True)
938+
with open(lock_file, mode='w'):
939+
pass
939940
except OSError as e:
940941
raise IOError(str(e)) from e
941942

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/gitpython-developers/GitPython/commit/47147406a5931e07641385f27e0e018927044c55

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy