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

Skip to content

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)