Skip to content

Commit

Permalink
gitpython-developers#1566 Creating a lock now uses python built-in "o…
Browse files Browse the repository at this point in the history
…pen()" method to work around docker virtiofs issue (backport to 1.0.2)
  • Loading branch information
HageMaster3108 committed Jul 27, 2023
1 parent dbc07b4 commit 08d82cd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions git/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,7 @@ def _obtain_lock_or_raise(self):
(self._file_path, lock_file))

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

Expand Down

0 comments on commit 08d82cd

Please sign in to comment.