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

Appearance settings

Commit bfede46

Browse filesBrowse files
committed
Reword the timeout error message in cbook._lock_path.
1) Lock files are specific files now, not globs of directories. 2) Format the path with `{}`, not `{!r}` as _lock_path is passing a Path object but we don't want the error message to say "PosixPath('foo')", just "foo". The previously used `_lockstr` will go away at the same time the deprecated `Locked` is removed.
1 parent 9ec4b95 commit bfede46
Copy full SHA for bfede46

File tree

Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed

‎lib/matplotlib/cbook/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/cbook/__init__.py
+6-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.