8000 Only call dirname on string-like directory names · matplotlib/matplotlib@87e2e2c · GitHub
[go: up one dir, main page]

Skip to content
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 87e2e2c

Browse files
committed
Only call dirname on string-like directory names
1 parent 7f3bac3 commit 87e2e2c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/matplotlib/font_manager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@ def win32InstalledFonts(directory=None, fontext='ttf'):
223223
for j in range(_winreg.QueryInfoKey(local)[1]):
224224
try:
225225
key, direc, any = _winreg.EnumValue( local, j)
226+
if not is_string_like(direc):
227+
continue
226228
if not os.path.dirname(direc):
227229
direc = os.path.join(directory, direc)
228230
direc = os.path.abspath(direc).lower()

0 commit comments

Comments
 (0)
0