[Zope3-checkins] CVS: Zope3/src/zope/fssync - fssync.py:1.21
Guido van Rossum
guido@python.org
Thu, 15 May 2003 14:18:26 -0400
Update of /cvs-repository/Zope3/src/zope/fssync
In directory cvs.zope.org:/tmp/cvs-serv12251
Modified Files:
fssync.py
Log Message:
Support checking out the Zope root. It will be placed in a
subdirectory named 'root' of the target.
=== Zope3/src/zope/fssync/fssync.py 1.20 => 1.21 ===
--- Zope3/src/zope/fssync/fssync.py:1.20 Thu May 15 11:41:42 2003
+++ Zope3/src/zope/fssync/fssync.py Thu May 15 14:18:26 2003
@@ -131,6 +131,8 @@
if roottype == "https" and not hasattr(httplib, "HTTPS"):
raise Error("https not supported by this Python build")
netloc, rootpath = urllib.splithost(rest)
+ if not rootpath:
+ rootpath = "/"
user_passwd, host_port = urllib.splituser(netloc)
self.rooturl = rooturl
@@ -272,7 +274,7 @@
fsutil.ensuredir(target)
i = rootpath.rfind("/")
tail = rootpath[i+1:]
- assert tail
+ tail = tail or "root"
fp, headers = self.network.httpreq(rootpath, "@@toFS.zip")
try:
self.merge_zipfile(fp, target, tail)