[Zope-Checkins] CVS: Zope2 - Collection.py:1.20.22.2 Resource.py:1.45.10.2 davcmds.py:1.13.22.2
andreas@serenade.digicool.com
andreas@serenade.digicool.com
Mon, 2 Jul 2001 12:31:11 -0400
Update of /cvs-repository/Zope2/lib/python/webdav
In directory serenade:/tmp/cvs-serv14559
Modified Files:
Tag: ajung-webdav
Collection.py Resource.py davcmds.py
Log Message:
several fixed - should now work more or less with M$ Office 2K
--- Updated File Collection.py in package Zope2 --
--- Collection.py 2001/07/02 16:05:37 1.20.22.1
+++ Collection.py 2001/07/02 16:31:11 1.20.22.2
@@ -195,7 +195,6 @@
if parent.manage_delObjects([name],REQUEST=None) is None:
RESPONSE.setStatus(204)
else:
- print "403 pos1"
RESPONSE.setStatus(403)
return RESPONSE
--- Updated File Resource.py in package Zope2 --
--- Resource.py 2001/07/02 16:05:37 1.45.10.1
+++ Resource.py 2001/07/02 16:31:11 1.45.10.2
@@ -181,18 +181,12 @@
found = 0; resourcetagged = 0
taglist = IfParser(ifhdr)
for tag in taglist:
- print "tag",tag
+
if not tag.resource:
# There's no resource (url) with this tag
tag_list = map(tokenFinder, tag.list)
-
- print "taglist",tag_list
- try:
- wehave = filter(havetag, tag_list)
- except:
- print sys.exc_type,sys.exc_value
- print "error"
+ wehave = filter(havetag, tag_list)
if not wehave: continue
if tag.NOTTED: continue
@@ -309,7 +303,7 @@
if parent.manage_delObjects([name],REQUEST=None) is None:
RESPONSE.setStatus(204)
else:
- print "403 pos2"
+
RESPONSE.setStatus(403)
return RESPONSE
--- Updated File davcmds.py in package Zope2 --
--- davcmds.py 2001/07/02 16:05:37 1.13.22.1
+++ davcmds.py 2001/07/02 16:31:11 1.13.22.2
@@ -383,21 +383,12 @@
else:
el.remap({dav:'o'})
self.owner = lockowner.strval()
- print "got owner",self.owner
def apply(self, obj, creator=None, depth='infinity', token=None,
result=None, url=None, top=1):
""" Apply, built for recursion (so that we may lock subitems
of a collection if requested """
-
- print "obj",obj
- print "creator",creator
- print "token",token
- print "depth",depth
-
-# import pdb
-# pdb.set_trace()
if result is None:
result = StringIO()
url = urlfix(self.request['URL'], 'LOCK')
@@ -411,13 +402,10 @@
lock = LockItem(creator, self.owner, depth, self.timeout,
self.type, self.scope, token)
if token is None: token = lock.getLockToken()
- print "got token:",token
+
except ValueError, valerrors:
- print sys.exc_type,sys.exc_value
errmsg = "412 Precondition Failed"
except:
- print sys.exc_type,sys.exc_value
- print "403 pos3"
errmsg = "403 Forbidden"
try:
@@ -434,19 +422,13 @@
errmsg = "423 Locked"
else:
method = getattr(obj, 'wl_setLock')
- print 'token',token
- print 'method',method
- print 'obj',obj
vld = getSecurityManager().validate(None, obj, 'wl_setLock',
method)
- print "vld",vld
if vld and token and (lock is not None):
obj.wl_setLock(token, lock)
else:
- print "403 pos4"
errmsg = "403 Forbidden"
except:
- print "403 pos5"
errmsg = "403 Forbidden"
if errmsg:
@@ -497,7 +479,6 @@
if vld: obj.wl_delLock(token)
else:
errmsg = "403 Forbidden"
- print "403 pos6"
elif not islockable:
# Only set an error message if the command is being applied
# to a top level object. Otherwise, we're descending a tree
@@ -551,7 +532,6 @@
islockable = WriteLockInterface.isImplementedBy(obj)
if parent and (not user.has_permission('Delete objects', parent)):
# User doesn't have permission to delete this object
- print "403 pos 7"
errmsg = "403 Forbidden"
elif islockable and obj.wl_isLocked():
if token and obj.wl_hasLock(token):