diff options
author | Dmitry Shachnev <mitya57@gmail.com> | 2014-01-22 18:34:51 +0400 |
---|---|---|
committer | Dmitry Shachnev <mitya57@gmail.com> | 2014-01-22 18:34:51 +0400 |
commit | 953b33d3f721e58ab48490d33c141df1e4dd25c1 (patch) | |
tree | 26bce4c2ef75b4ebe8422685d8962aa07978bad2 /sphinx/ext/graphviz.py | |
parent | 317930a7fbd49b50fb8a144161a698fcafeab91a (diff) | |
parent | 5f13479408785818ee8b85d4172314ea5578fde3 (diff) | |
download | sphinx-git-953b33d3f721e58ab48490d33c141df1e4dd25c1.tar.gz |
Merge
Diffstat (limited to 'sphinx/ext/graphviz.py')
-rw-r--r-- | sphinx/ext/graphviz.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sphinx/ext/graphviz.py b/sphinx/ext/graphviz.py index 32bb96d33..c3096e3a4 100644 --- a/sphinx/ext/graphviz.py +++ b/sphinx/ext/graphviz.py @@ -156,7 +156,7 @@ def render_dot(self, code, options, format, prefix='graphviz'): dot_args.extend(['-Tcmapx', '-o%s.map' % outfn]) try: p = Popen(dot_args, stdout=PIPE, stdin=PIPE, stderr=PIPE) - except OSError, err: + except OSError as err: if err.errno != ENOENT: # No such file or directory raise self.builder.warn('dot command %r cannot be run (needed for graphviz ' @@ -168,7 +168,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, IOError), err: + except (OSError, IOError) as err: if err.errno not in (EPIPE, EINVAL): raise # in this case, read the standard output and standard error streams @@ -192,7 +192,7 @@ def render_dot_html(self, node, code, options, prefix='graphviz', raise GraphvizError("graphviz_output_format must be one of 'png', " "'svg', but is %r" % format) fname, outfn = render_dot(self, code, options, format, prefix) - except GraphvizError, exc: + except GraphvizError as exc: self.builder.warn('dot code %r: ' % code + str(exc)) raise nodes.SkipNode @@ -243,7 +243,7 @@ def html_visit_graphviz(self, node): def render_dot_latex(self, node, code, options, prefix='graphviz'): try: fname, outfn = render_dot(self, code, options, 'pdf', prefix) - except GraphvizError, exc: + except GraphvizError as exc: self.builder.warn('dot code %r: ' % code + str(exc)) raise nodes.SkipNode @@ -276,7 +276,7 @@ def latex_visit_graphviz(self, node): def render_dot_texinfo(self, node, code, options, prefix='graphviz'): try: fname, outfn = render_dot(self, code, options, 'png', prefix) - except GraphvizError, exc: + except GraphvizError as exc: self.builder.warn('dot code %r: ' % code + str(exc)) raise nodes.SkipNode if fname is not None: |