summaryrefslogtreecommitdiff
path: root/sphinx/builders/websupport.py
diff options
context:
space:
mode:
authorDaniel Neuhäuser <ich@danielneuhaeuser.de>2010-08-14 11:17:38 +0200
committerDaniel Neuhäuser <ich@danielneuhaeuser.de>2010-08-14 11:17:38 +0200
commit1f0b25be796c8d62a3607d4e6498b43ed1cf8481 (patch)
tree74bca04b432822950548a7ab7487a0afa9ebd3a6 /sphinx/builders/websupport.py
parent1f1ed85390a2e84a4757e9b226fcd1a1cb4f2199 (diff)
downloadsphinx-git-1f0b25be796c8d62a3607d4e6498b43ed1cf8481.tar.gz
Fix finish handler of the websupport builder
Diffstat (limited to 'sphinx/builders/websupport.py')
-rw-r--r--sphinx/builders/websupport.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/sphinx/builders/websupport.py b/sphinx/builders/websupport.py
index 16e3a82bd..0c92c646d 100644
--- a/sphinx/builders/websupport.py
+++ b/sphinx/builders/websupport.py
@@ -151,12 +151,15 @@ class WebSupportBuilder(StandaloneHTMLBuilder):
def handle_finish(self):
StandaloneHTMLBuilder.handle_finish(self)
- shutil.move(path.join(self.outdir, '_images'),
- path.join(self.app.builddir, self.app.staticdir,
- '_images'))
- shutil.move(path.join(self.outdir, '_static'),
- path.join(self.app.builddir, self.app.staticdir,
- '_static'))
+ directories = ['_images', '_static']
+ for directory in directories:
+ try:
+ shutil.move(path.join(self.outdir, directory),
+ path.join(self.app.builddir, self.app.staticdir,
+ directory))
+ except IOError:
+ # in case any of these directories don't exist
+ pass
for f in glob(path.join(self.doctreedir, '*.doctree.old')):
os.remove(f)