From: <as...@us...> - 2009-11-23 03:38:21
|
Revision: 7979 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7979&view=rev Author: astraw Date: 2009-11-23 03:38:11 +0000 (Mon, 23 Nov 2009) Log Message: ----------- bugfix: don't crash PDF backend when not using SVN checkout Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py Modified: trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py 2009-11-21 00:30:37 UTC (rev 7978) +++ trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py 2009-11-23 03:38:11 UTC (rev 7979) @@ -398,10 +398,14 @@ 'Pages': self.pagesObject } self.writeObject(self.rootObject, root) - revision = '$Rev$'.strip('$').split(':')[1].strip() + svn_special_string = '$Rev$' # on checkout, gets replaced by svn client + if ':' in svn_special_string: + revision = ' r'+svn_special_string.strip('$').split(':')[1].strip() + else: + revision = '' self.infoDict = { 'Creator': 'matplotlib %s, http://matplotlib.sf.net' % __version__, - 'Producer': 'matplotlib pdf backend r%s' % revision, + 'Producer': 'matplotlib pdf backend%s' % revision, 'CreationDate': datetime.today() } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |