diff options
author | Georg Brandl <georg@python.org> | 2009-12-24 12:58:53 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-12-24 12:58:53 +0100 |
commit | 0dc0837e010d74fa03c1760be9721deb6ddf73d8 (patch) | |
tree | 7716f7fb2e7b5fb5539d180cae97d48e2211d2be /sphinx/ext/pngmath.py | |
parent | a3f11db6b75271e75d6e72ce0af217d8812c66fb (diff) | |
download | sphinx-git-0dc0837e010d74fa03c1760be9721deb6ddf73d8.tar.gz |
#301: use errno values from errno module.
Diffstat (limited to 'sphinx/ext/pngmath.py')
-rw-r--r-- | sphinx/ext/pngmath.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/ext/pngmath.py b/sphinx/ext/pngmath.py index 02f46e3d3..a3df27e43 100644 --- a/sphinx/ext/pngmath.py +++ b/sphinx/ext/pngmath.py @@ -23,7 +23,7 @@ except ImportError: from docutils import nodes from sphinx.errors import SphinxError -from sphinx.util import ensuredir +from sphinx.util import ensuredir, ENOENT from sphinx.util.png import read_png_depth, write_png_depth from sphinx.ext.mathbase import setup_math as mathbase_setup, wrap_displaymath @@ -119,7 +119,7 @@ def render_math(self, math): try: p = Popen(ltx_args, stdout=PIPE, stderr=PIPE) except OSError, err: - if err.errno != 2: # No such file or directory + if err.errno != ENOENT: # No such file or directory raise self.builder.warn('LaTeX command %r cannot be run (needed for math ' 'display), check the pngmath_latex setting' % @@ -147,7 +147,7 @@ def render_math(self, math): try: p = Popen(dvipng_args, stdout=PIPE, stderr=PIPE) except OSError, err: - if err.errno != 2: # No such file or directory + if err.errno != ENOENT: # No such file or directory raise self.builder.warn('dvipng command %r cannot be run (needed for math ' 'display), check the pngmath_dvipng setting' % |