Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit0084e4a

Browse files
authored
Merge pull request#9676 from jklymak/font_cache
FIX: Catch IOError on font-cache write
2 parents14216a9 +f1d3dac commit0084e4a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎lib/matplotlib/font_manager.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -964,8 +964,10 @@ def json_dump(data, filename):
964964
Handles FontManager and its fields."""
965965

966966
withopen(filename,'w')asfh:
967-
json.dump(data,fh,cls=JSONEncoder,indent=2)
968-
967+
try:
968+
json.dump(data,fh,cls=JSONEncoder,indent=2)
969+
exceptIOErrorase:
970+
warnings.warn('Could not save font_manager cache ',e)
969971

970972
defjson_load(filename):
971973
"""Loads a data structure as JSON from the named file.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp