summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-01-10 15:07:17 +0100
committerGeorg Brandl <georg@python.org>2014-01-10 15:07:17 +0100
commit428ec87be0137b9ea3acf7ccf50cce773760b2e9 (patch)
tree2981fe3cd09f576d9a2e934b63a5f0db3c4b52e9
parent7b058f3cff97c52e5cd29b6bec47ec49cbfe599a (diff)
downloadsphinx-428ec87be0137b9ea3acf7ccf50cce773760b2e9.tar.gz
Closes #1319: Do not crash if the ``html_logo`` file does not exist.
-rw-r--r--CHANGES2
-rw-r--r--sphinx/builders/html.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 9823d3e9..ae57ace8 100644
--- a/CHANGES
+++ b/CHANGES
@@ -15,6 +15,8 @@ Bugs fixed
* #1340: Can't search alphabetical words on the HTML quick search generated
with language='ja'.
+* #1319: Do not crash if the ``html_logo`` file does not exist.
+
Documentation
-------------
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py
index e00b91c3..ecc8a3b6 100644
--- a/sphinx/builders/html.py
+++ b/sphinx/builders/html.py
@@ -597,7 +597,9 @@ class StandaloneHTMLBuilder(Builder):
if self.config.html_logo:
logobase = path.basename(self.config.html_logo)
logotarget = path.join(self.outdir, '_static', logobase)
- if not path.isfile(logotarget):
+ if not path.isfile(logobase):
+ self.warn('logo file %r does not exist' % logobase)
+ elif not path.isfile(logotarget):
copyfile(path.join(self.confdir, self.config.html_logo),
logotarget)
if self.config.html_favicon: