From: <as...@us...> - 2008-12-11 18:29:42
|
Revision: 6563 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6563&view=rev Author: astraw Date: 2008-12-11 18:29:30 +0000 (Thu, 11 Dec 2008) Log Message: ----------- /matplotlib/__init__.py: catch OSError when calling subprocess. An OSError can occur when the user does not have the command in the path. Fixes an error reported by Nils Wagner. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/__init__.py Modified: trunk/matplotlib/lib/matplotlib/__init__.py =================================================================== --- trunk/matplotlib/lib/matplotlib/__init__.py 2008-12-11 17:45:45 UTC (rev 6562) +++ trunk/matplotlib/lib/matplotlib/__init__.py 2008-12-11 18:29:30 UTC (rev 6563) @@ -262,7 +262,7 @@ line = s.stdout.readlines()[1] v = line.split()[-1] return v - except (IndexError, ValueError): + except (IndexError, ValueError, OSError): return None def checkdep_ghostscript(): @@ -275,7 +275,7 @@ stderr=subprocess.PIPE) v = s.stdout.read()[:-1] return v - except (IndexError, ValueError): + except (IndexError, ValueError, OSError): return None def checkdep_tex(): @@ -287,7 +287,7 @@ match = re.search(pattern, line) v = match.group(0) return v - except (IndexError, ValueError, AttributeError): + except (IndexError, ValueError, AttributeError, OSError): return None def checkdep_pdftops(): @@ -298,7 +298,7 @@ if 'version' in line: v = line.split()[-1] return v - except (IndexError, ValueError, UnboundLocalError): + except (IndexError, ValueError, UnboundLocalError, OSError): return None def compare_versions(a, b): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |