Revision: 4653
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4653&view=rev
Author:   mdboom
Date:     2007-12-06 11:10:12 -0800 (Thu, 06 Dec 2007)

Log Message:
-----------
[ 1841933 ] font_manager.win32FontDirectory() fails as Vista service

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/font_manager.py

Modified: trunk/matplotlib/lib/matplotlib/font_manager.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/font_manager.py     2007-12-06 18:49:35 UTC 
(rev 4652)
+++ trunk/matplotlib/lib/matplotlib/font_manager.py     2007-12-06 19:10:12 UTC 
(rev 4653)
@@ -105,14 +105,16 @@
     try:
         import _winreg
     except ImportError:
-        return os.path.join(os.environ['WINDIR'], 'Fonts')
+        pass # Fall through to default
     else:
         user = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, MSFolders)
         try:
             return _winreg.QueryValueEx(user, 'Fonts')[0]
+        except OSError:
+            pass # Fall through to default
         finally:
             _winreg.CloseKey(user)
-    return None
+    return os.path.join(os.environ['WINDIR'], 'Fonts')
 
 def win32InstalledFonts(directory=None, fontext='ttf'):
     """


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to