File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ skipsdist = true
1212commands =
1313 python3 --version
1414 python3 -m coverage run -m unittest
15- python3 -m coverage report -m --fail-under 97
15+ python3 -m coverage report -m --fail-under 96
1616
1717deps =
1818 -r{toxinidir}/requirements/test.txt
Original file line number Diff line number Diff line change @@ -92,8 +92,14 @@ def _lock_file(f: IO) -> None:
9292 f .write (b"\0 " )
9393 f .flush ()
9494 f .seek (0 )
95-
96- msvcrt .locking (f .fileno (), msvcrt .LK_LOCK , 1 )
95+ # msvcrt.locking() only retries 9 times
96+ while True :
97+ try :
98+ msvcrt .locking (f .fileno (), msvcrt .LK_LOCK , 1 )
99+ logger .warning ("Got metadata lock" )
100+ return
101+ except OSError as e :
102+ logger .warning ("Failed to get metadata lock, retrying: %s" , e )
97103
98104
99105class Updater :
You can’t perform that action at this time.
0 commit comments