[Zope-Checkins] CVS: Zope/lib/python/OFS - ObjectManager.py:1.143.2.4
Andreas Jung
andreas@zope.com
Wed, 7 Nov 2001 15:15:13 -0500
Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv7912
Modified Files:
Tag: ajung-webdav-debug
ObjectManager.py
Log Message:
added some logging
=== Zope/lib/python/OFS/ObjectManager.py 1.143.2.3 => 1.143.2.4 ===
import App.Common
from AccessControl import getSecurityManager
-from zLOG import LOG, ERROR
+from zLOG import LOG, ERROR,WARNING
import sys,string,fnmatch,copy
import types
from webdav.LockItem import LockItem
@@ -698,7 +698,6 @@
def manage_lockObjects(self, ids=None, REQUEST=None, RESPONSE=None):
""" Lock selected objects """
-
user=getSecurityManager().getUser()
if ids is None and REQUEST is not None:
@@ -706,8 +705,7 @@
elif ids is None:
raise ValueError, 'ids must be specified'
- if isinstance(ids,types.StringType):
- ids=[ids]
+ if isinstance(ids,types.StringType): ids=[ids]
for id in ids:
@@ -716,9 +714,10 @@
raise 'BadRequest', '%s does not exist' % ids[-1]
LI = LockItem(user)
- try: v.wl_setLock(LI.getLockToken(),LI)
- except: pass
-
+ try:
+ v.wl_setLock(LI.getLockToken(),LI)
+ except:
+ LOG('Zope',WARNING ,"LOCK failed",v.getPhysicalPath())
return self.manage_main(self, REQUEST)
@@ -741,8 +740,11 @@
if v is self:
raise 'BadRequest', '%s does not exist' % ids[-1]
- try: v.wl_clearLocks()
- except: pass
+ try:
+ v.wl_clearLocks()
+ except:
+ LOG('Zope',WARNING ,"UNLOCK failed",v.getPhysicalPath())
+
return self.manage_main(self, REQUEST)