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

Appearance settings

Commit 7062d35

Browse filesBrowse files
committed
[ 1966974 ] win32FontDirectory() can fail with access denied (Thanks,
Patrik Simons) svn path=/branches/v0_91_maint/; revision=5193
1 parent a60b45f commit 7062d35
Copy full SHA for 7062d35

File tree

Expand file treeCollapse file tree

2 files changed

+12
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+12
-6
lines changed

‎CHANGELOG

Copy file name to clipboardExpand all lines: CHANGELOG
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2008-05-19 Fix crash when Windows can not access the registry to
2+
determine font path [Bug 1966974, thanks Patrik Simons] - MGD
3+
14
2008-05-14 Don't use stat on Windows (fixes font embedding problem) - MGD
25

36
2008-05-09 Fix /singlequote (') in Postscript backend - MGD

‎lib/matplotlib/font_manager.py

Copy file name to clipboardExpand all lines: lib/matplotlib/font_manager.py
+9-6Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,17 @@ def win32FontDirectory():
107107
except ImportError:
108108
pass # Fall through to default
109109
else:
110-
user = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, MSFolders)
111110
try:
111+
user = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, MSFolders)
112112
try:
113-
return _winreg.QueryValueEx(user, 'Fonts')[0]
114-
except OSError:
115-
pass # Fall through to default
116-
finally:
117-
_winreg.CloseKey(user)
113+
try:
114+
return _winreg.QueryValueEx(user, 'Fonts')[0]
115+
except OSError:
116+
pass # Fall through to default
117+
finally:
118+
_winreg.CloseKey(user)
119+
except OSError:
120+
pass # Fall through to default
118121
return os.path.join(os.environ['WINDIR'], 'Fonts')
119122

120123
def win32InstalledFonts(directory=None, fontext='ttf'):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.