Skip to content

Commit

Permalink
Creating a lock now uses python built-in "open()" method to work arou…
Browse files Browse the repository at this point in the history
…nd docker virtiofs issue
  • Loading branch information
HageMaster3108 committed Jul 27, 2023
1 parent 1c8310d commit 186c1ae
Showing 1 changed file with 1 addition and 5 deletions.
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

0 comments on commit 186c1ae

Please sign in to comment.