8000 Update lib/matplotlib/backend_bases.py · matplotlib/matplotlib@7fdd46d · GitHub
[go: up one dir, main page]

Skip to content

Commit 7fdd46d

Browse files
ianthomas23timhoffm
andcommitted
Update lib/matplotlib/backend_bases.py
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
1 parent 9ee5e87 commit 7fdd46d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def _safe_pyplot_import():
108108
from matplotlib.backends.registry import backend_registry
109109
backend = backend_registry.backend_for_gui_framework(current_framework)
110110
if backend is None:
111-
raise KeyError(backend)
111+
raise RuntimeError(f"No suitable backend for the current GUI framework {current_framework!r}")
112112

113113
rcParams["backend"] = mpl.rcParamsOrig["backend"] = backend
114114
import matplotlib.pyplot as plt # Now this should succeed.

0 commit comments

Comments
 (0)
0