Commit aa21ed8
committed
Suppress exception chaining in colormap lookup.
Replace
```
Traceback (most recent call last):
File "../matplotlib/cm.py", line 131, in __getitem__
return self._cmaps[item].copy()
KeyError: 'foo'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 4, in <module>
File ".../matplotlib/cm.py", line 133, in __getitem__
raise KeyError(f"{item!r} is not a known colormap name")
KeyError: "'foo' is not a known colormap name"
```
by just the latter block.1 parent d3cc9d7 commit aa21ed8
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
0 commit comments