Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Creating a lock now uses python built-in "open()" method to work arou…
…nd docker virtiofs issue
  • Loading branch information
HageMaster3108 committed Jul 27, 2023
commit 186c1ae12be1bb76087dd4fa53a1ac0979c8aa9f
6 changes: 1 addition & 5 deletions git/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,11 +935,7 @@ def _obtain_lock_or_raise(self) -> None:
)

try:
flags = os.O_WRONLY | os.O_CREAT | os.O_EXCL
if is_win:
flags |= os.O_SHORT_LIVED
fd = os.open(lock_file, flags, 0)
os.close(fd)
open(lock_file, mode='w', closefd=True)
except OSError as e:
raise IOError(str(e)) from e

Expand Down