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

Skip to content

Commit 8d3cd0c

Browse files
committed
Minor fixes
1 parent bc00dc9 commit 8d3cd0c

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

lib/matplotlib/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,6 +1256,7 @@ def __init__(self, rc=None, fname=None):
12561256
rcParams.update(self.rcdict)
12571257
except:
12581258
# if anything goes wrong, revert rc parameters and re-raise
1259+
rcParams.clear()
12591260
rcParams.update(self._rcparams)
12601261
raise
12611262

lib/matplotlib/tests/test_rcparams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def test_rcparams_reset_after_fail():
272272

273273
try:
274274
from collections import OrderedDict
275-
except:
275+
except ImportError:
276276
return # can't run this test on Python 2.6
277277

278278
with mpl.rc_context(rc={'text.usetex': False}):

0 commit comments

Comments
 (0)