Closes #1319: Do not crash if the `html_logo` file does not exist.

This commit is contained in:
Georg Brandl 2014-01-10 15:07:17 +01:00
parent bae7682bad
commit 9afe960855
2 changed files with 5 additions and 1 deletions

View File

@ -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
-------------

View File

@ -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: