#316: broader range of exceptions to catch while communicating with subprocess.

This commit is contained in:
Georg Brandl committed 2011-09-21 18:43:49 +02:00
1 parent cb54b7db4e
commit 4239392906
1 file changed
+1 -1
+1 -1
View File
@@ -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