summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-02-27 14:24:35 -0700
committerCharles Harris <charlesr.harris@gmail.com>2013-02-27 14:31:12 -0700
commitc6397ba59fba25989b0ba37ad8267325757f1dcd (patch)
tree1501c04214cbf846badc7988de6ff5f2094c9940 /doc
parent208072f817ac14f041569f0123d3434bc9e0daba (diff)
downloadnumpy-c6397ba59fba25989b0ba37ad8267325757f1dcd.tar.gz
2to3: Updata `except Exception, msg:` syntax in files not in numpy/ .
This should finish the updating of the exception syntax.
Diffstat (limited to 'doc')
-rw-r--r--doc/sphinxext/docscrape.py2
-rw-r--r--doc/sphinxext/plot_directive.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/sphinxext/docscrape.py b/doc/sphinxext/docscrape.py
index bbd3fcacc..f2d6d47f1 100644
--- a/doc/sphinxext/docscrape.py
+++ b/doc/sphinxext/docscrape.py
@@ -428,7 +428,7 @@ class FunctionDoc(NumpyDocString):
argspec = inspect.formatargspec(*argspec)
argspec = argspec.replace('*','\*')
signature = '%s%s' % (func_name, argspec)
- except TypeError, e:
+ except TypeError as e:
signature = '%s()' % func_name
self['Signature'] = signature
diff --git a/doc/sphinxext/plot_directive.py b/doc/sphinxext/plot_directive.py
index 80801e798..fad7a76d7 100644
--- a/doc/sphinxext/plot_directive.py
+++ b/doc/sphinxext/plot_directive.py
@@ -291,7 +291,7 @@ def run(arguments, content, options, state_machine, state, lineno):
results = makefig(code, source_file_name, build_dir, output_base,
config)
errors = []
- except PlotError, err:
+ except PlotError as err:
reporter = state.memo.reporter
sm = reporter.system_message(
2, "Exception occurred in plotting %s: %s" % (output_base, err),
@@ -458,7 +458,7 @@ def run_code(code, code_path, ns=None):
if not ns:
exec setup.config.plot_pre_code in ns
exec code in ns
- except (Exception, SystemExit), err:
+ except (Exception, SystemExit) as err:
raise PlotError(traceback.format_exc())
finally:
os.chdir(pwd)
@@ -565,7 +565,7 @@ def makefig(code, code_path, output_dir, output_base, config):
for format, dpi in formats:
try:
figman.canvas.figure.savefig(img.filename(format), dpi=dpi)
- except exceptions.BaseException, err:
+ except exceptions.BaseException as err:
raise PlotError(traceback.format_exc())
img.formats.append(format)