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

Skip to content

Commit 78825c8

Browse files
committed
Fix syntax for pre-Python 2.5
svn path=/trunk/matplotlib/; revision=4685
1 parent 8377d7e commit 78825c8

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

lib/matplotlib/font_manager.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,10 @@ def win32FontDirectory():
109109
else:
110110
user = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, MSFolders)
111111
try:
112-
return _winreg.QueryValueEx(user, 'Fonts')[0]
113-
except OSError:
114-
pass # Fall through to default
112+
try:
113+
return _winreg.QueryValueEx(user, 'Fonts')[0]
114+
except OSError:
115+
pass # Fall through to default
115116
finally:
116117
_winreg.CloseKey(user)
117118
return os.path.join(os.environ['WINDIR'], 'Fonts')

0 commit comments

Comments
 (0)