Skip to content

Commit 08d82cd

Browse files
gitpython-developers#1566 Creating a lock now uses python built-in "open()" method to work around docker virtiofs issue (backport to 1.0.2)
1 parent dbc07b4 commit 08d82cd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: git/util.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -539,8 +539,7 @@ def _obtain_lock_or_raise(self):
539539
(self._file_path, lock_file))
540540

541541
try:
542-
fd = os.open(lock_file, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0)
543-
os.close(fd)
542+
open(lock_file, mode='w', closefd=True)
544543
except OSError as e:
545544
raise IOError(str(e))
546545

0 commit comments

Comments
 (0)