mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-15 01:42:12 -05:00
#316: broader range of exceptions to catch while communicating with subprocess.
This commit is contained in:
1 parent
cb54b7db4e
commit
4239392906
1 file changed
+1
-1
@@ -137,7 +137,7 @@ def render_dot(self, code, options, format, prefix='graphviz'):
|
||||
# Graphviz may close standard input when an error occurs,
|
||||
# resulting in a broken pipe on communicate()
|
||||
stdout, stderr = p.communicate(code)
|
||||
except OSError, err:
|
||||
except (OSError, IOError), err:
|
||||
if err.errno != EPIPE:
|
||||
raise
|
||||
# in this case, read the standard output and standard error streams
|
||||
|
||||
Reference in new issue
Block a user