10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f76bba4 commit 5552302Copy full SHA for 5552302
lib/matplotlib/font_manager.py
@@ -266,8 +266,11 @@ def _get_fontconfig_fonts():
266
@lru_cache
267
def _get_macos_fonts():
268
"""Cache and list the font paths known to ``system_profiler SPFontsDataType``."""
269
- d, = plistlib.loads(
270
- subprocess.check_output(["system_profiler", "-xml", "SPFontsDataType"]))
+ try:
+ d, = plistlib.loads(
271
+ subprocess.check_output(["system_profiler", "-xml", "SPFontsDataType"]))
272
+ except (OSError, subprocess.CalledProcessError, plistlib.InvalidFileException):
273
+ return []
274
return [Path(entry["path"]) for entry in d["_items"]]
275
276
0 commit comments