Skip to content

Commit 186c1ae

Browse files
Creating a lock now uses python built-in "open()" method to work around docker virtiofs issue
1 parent 1c8310d commit 186c1ae

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

‎git/util.py‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -935,11 +935,7 @@ def _obtain_lock_or_raise(self) -> None:
935935
)
936936

937937
try:
938-
flags=os.O_WRONLY|os.O_CREAT|os.O_EXCL
939-
ifis_win:
940-
flags|=os.O_SHORT_LIVED
941-
fd=os.open(lock_file, flags, 0)
942-
os.close(fd)
938+
open(lock_file, mode='w', closefd=True)
943939
exceptOSErrorase:
944940
raiseIOError(str(e)) frome
945941

0 commit comments

Comments
(0)