Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7e09c00

Browse files
authored
Merge pull request #11239 from anntzer/lockmessage
Reword the timeout error message in cbook._lock_path.
2 parents 59e550b + bfede46 commit 7e09c00

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/matplotlib/cbook/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1925,7 +1925,12 @@ def _lock_path(path):
19251925
except FileExistsError:
19261926
time.sleep(sleeptime)
19271927
else:
1928-
raise TimeoutError(_lockstr.format(lock_path))
1928+
raise TimeoutError("""\
1929+
Lock error: Matplotlib failed to acquire the following lock file:
1930+
{}
1931+
This maybe due to another process holding this lock file. If you are sure no
1932+
other Matplotlib process is running, remove this file and try again.""".format(
1933+
lock_path))
19291934
try:
19301935
yield
19311936
finally:

0 commit comments

Comments
 (0)