From fd3ea15e0e60ede0ed51846a391379ad3b857cf1 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 11 Nov 2016 20:00:35 -0800 Subject: [PATCH] =?UTF-8?q?Handle=20case=20where=20the=20docs=20say=20ther?= =?UTF-8?q?e=20is=20an=20image,=20but=20there=20isn=E2=80=99t.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- etgtools/sphinx_generator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etgtools/sphinx_generator.py b/etgtools/sphinx_generator.py index d2369000..855ac9d2 100644 --- a/etgtools/sphinx_generator.py +++ b/etgtools/sphinx_generator.py @@ -1150,6 +1150,9 @@ class Image(Node): image_path = os.path.normpath(os.path.join(DOXYROOT, 'images', value)) static_path = os.path.join(OVERVIEW_IMAGES_ROOT, os.path.split(image_path)[1]) + if not os.path.exists(image_path): + return '' + if not os.path.isfile(static_path): shutil.copyfile(image_path, static_path)