From c62397493ac9c457527dfb4f39df6162f3a0e34b Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 13 Mar 2015 08:18:50 -0500 Subject: [PATCH] Handle Sphinx 1.3 API change --- doc/ext/plot2rst.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/ext/plot2rst.py b/doc/ext/plot2rst.py index 99fd9a3f..1a35a8a2 100644 --- a/doc/ext/plot2rst.py +++ b/doc/ext/plot2rst.py @@ -205,6 +205,9 @@ def generate_examples_and_gallery(example_dir, rst_dir, cfg): rst_dir.makedirs() # we create an index.rst with all examples + if isinstance(cfg.source_suffix, list): + cfg.source_suffix = cfg.source_suffix[0] + gallery_index = open(rst_dir.pjoin('index'+cfg.source_suffix), 'w') # Here we don't use an os.walk, but we recurse only twice: flat is