From: <md...@us...> - 2008-05-02 17:05:24
|
Revision: 5107 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5107&view=rev Author: mdboom Date: 2008-05-02 10:05:19 -0700 (Fri, 02 May 2008) Log Message: ----------- Don't call sys.exit() when pyemf is not found. Modified Paths: -------------- branches/v0_91_maint/CHANGELOG branches/v0_91_maint/lib/matplotlib/backends/backend_emf.py Modified: branches/v0_91_maint/CHANGELOG =================================================================== --- branches/v0_91_maint/CHANGELOG 2008-05-02 17:00:01 UTC (rev 5106) +++ branches/v0_91_maint/CHANGELOG 2008-05-02 17:05:19 UTC (rev 5107) @@ -1,3 +1,6 @@ +2008-05-02 Don't call sys.exit() when pyemf is not found [1924199] - + MGD + 2008-05-02 Update _subprocess.c from upstream Python 2.5.2 to get a few memory and reference-counting-related bugfixes. See bug 1949978. - MGD Modified: branches/v0_91_maint/lib/matplotlib/backends/backend_emf.py =================================================================== --- branches/v0_91_maint/lib/matplotlib/backends/backend_emf.py 2008-05-02 17:00:01 UTC (rev 5106) +++ branches/v0_91_maint/lib/matplotlib/backends/backend_emf.py 2008-05-02 17:05:19 UTC (rev 5107) @@ -8,9 +8,7 @@ try: import pyemf except ImportError: - import sys - print >>sys.stderr, 'You must first install pyemf from http://pyemf.sf.net' - sys.exit() + raise ImportError('You must first install pyemf from http://pyemf.sf.net') import os,sys,math,re @@ -600,7 +598,7 @@ pass filetypes = {'emf': 'Enhanced Metafile'} - + def print_emf(self, filename, dpi=300, **kwargs): width, height = self.figure.get_size_inches() renderer = RendererEMF(filename,width,height,dpi) @@ -609,7 +607,7 @@ def get_default_filetype(self): return 'emf' - + class FigureManagerEMF(FigureManagerBase): """ Wrap everything up into a window for the pylab interface This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |