Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit76fd1d4

Browse files
committed
LockFile: release_lock now checks whether the lockfile to be removed still exists. Previously it would just fail
1 parent180a502 commit76fd1d4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎lib/git/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,12 @@ def _release_lock(self):
166166
"""
167167
ifnotself._has_lock():
168168
return
169-
os.remove(self._lock_file_path())
169+
170+
# if someone removed our file beforhand, lets just flag this issue
171+
# instead of failing, to make it more usable.
172+
lfp=self._lock_file_path()
173+
ifos.path.isfile(lfp):
174+
os.remove(lfp)
170175
self._owns_lock=False
171176

172177

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp