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)
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