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

Skip to content

Commit 3098d1a

Browse files
committed
minor bugfix in default rcParams
svn path=/trunk/matplotlib/; revision=4868
1 parent 6814bf9 commit 3098d1a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/matplotlib/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,10 @@ def rc_params(fail_on_error=False):
561561

562562
fname = matplotlib_fname()
563563
if not os.path.exists(fname):
564+
# this should never happen, default in mpl-data should always be found
564565
message = 'could not find rc file; returning defaults'
565-
ret = dict([ (key, tup[0]) for key, tup in defaultParams.items()])
566+
ret = RcParams([ (key, default) for key, (default, converter) in \
567+
defaultParams.iteritems() ])
566568
warnings.warn(message)
567569
return ret
568570

0 commit comments

Comments
 (0)