Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 521e58b

Browse files
jkseppanmdboom
authored andcommitted
Only call dirname on string-like directory names
1 parent d9186fe commit 521e58b

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
@@ -224,6 +224,8 @@ def win32InstalledFonts(directory=None, fontext='ttf'):
224224
for j in range(_winreg.QueryInfoKey(local)[1]):
225225
try:
226226
key, direc, any = _winreg.EnumValue( local, j)
227+
if not is_string_like(direc):
228+
continue
227229
if not os.path.dirname(direc):
228230
direc = os.path.join(directory, direc)
229231
direc = os.path.abspath(direc).lower()

0 commit comments

Comments
 (0)