[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/process/mkzopeinstance.py - add some information to an assertion

Fred L. Drake, Jr. fred at zope.com
Fri May 14 12:03:14 EDT 2004


Log message for revision 24663:
- add some information to an assertion
- create a destination directory before copying things into it



-=-
Modified: Zope3/trunk/src/zope/app/process/mkzopeinstance.py
===================================================================
--- Zope3/trunk/src/zope/app/process/mkzopeinstance.py	2004-05-14 16:01:58 UTC (rev 24662)
+++ Zope3/trunk/src/zope/app/process/mkzopeinstance.py	2004-05-14 16:03:07 UTC (rev 24663)
@@ -122,12 +122,13 @@
         # Similar to shutil.copytree(), but doesn't care about
         # symlinks, doesn't collect errors, and uses self.copyfile()
         # instead of shutil.copy2().
-        assert os.path.isdir(dst)
+        assert os.path.isdir(dst), dst
         names = os.listdir(src)
         for name in names:
             srcname = os.path.join(src, name)
             dstname = os.path.join(dst, name)
             if os.path.isdir(srcname):
+                os.mkdir(dstname)
                 self.copytree(srcname, dstname)
             else:
                 self.copyfile(srcname, dstname)




More information about the Zope3-Checkins mailing list