[Python-checkins] r65551 - in doctools/branches/0.4.x: CHANGES sphinx/builder.py

georg.brandl python-checkins at python.org
Wed Aug 6 10:48:21 CEST 2008


Author: georg.brandl
Date: Wed Aug  6 10:48:21 2008
New Revision: 65551

Log:
Don't try to remove a nonexisting static dir.


Modified:
   doctools/branches/0.4.x/CHANGES
   doctools/branches/0.4.x/sphinx/builder.py

Modified: doctools/branches/0.4.x/CHANGES
==============================================================================
--- doctools/branches/0.4.x/CHANGES	(original)
+++ doctools/branches/0.4.x/CHANGES	Wed Aug  6 10:48:21 2008
@@ -1,6 +1,8 @@
 Release 0.4.3 (in development)
 ==============================
 
+* Don't try to remove a nonexisting static directory.
+
 * Fix an indentation problem in production lists.
 
 * Fix encoding handling for literal include files: ``literalinclude``

Modified: doctools/branches/0.4.x/sphinx/builder.py
==============================================================================
--- doctools/branches/0.4.x/sphinx/builder.py	(original)
+++ doctools/branches/0.4.x/sphinx/builder.py	Wed Aug  6 10:48:21 2008
@@ -595,7 +595,8 @@
                 if path.isfile(fullname):
                     shutil.copyfile(fullname, targetname)
                 elif path.isdir(fullname):
-                    shutil.rmtree(targetname)
+                    if path.exists(targetname):
+                        shutil.rmtree(targetname)
                     shutil.copytree(fullname, targetname)
         # copy logo file (handled differently)
         if self.config.html_logo:


More information about the Python-checkins mailing list