Thanks to visit codestin.com Credit goes to github.com
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 b751318 commit af90581Copy full SHA for af90581
1 file changed
lib/matplotlib/font_manager.py
@@ -105,14 +105,16 @@ def win32FontDirectory():
105
try:
106
import _winreg
107
except ImportError:
108
- return os.path.join(os.environ['WINDIR'], 'Fonts')
+ pass # Fall through to default
109
else:
110
user = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, MSFolders)
111
112
return _winreg.QueryValueEx(user, 'Fonts')[0]
113
+ except OSError:
114
115
finally:
116
_winreg.CloseKey(user)
- return None
117
+ return os.path.join(os.environ['WINDIR'], 'Fonts')
118
119
def win32InstalledFonts(directory=None, fontext='ttf'):
120
"""
0 commit comments