[Zope3-checkins] CVS: Zope3/src/zope/app/dav - mkcol.py:1.2

Jim Fulton jim at zope.com
Sun Sep 21 13:32:04 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/dav
In directory cvs.zope.org:/tmp/cvs-serv13848/src/zope/app/dav

Modified Files:
	mkcol.py 
Log Message:
Changed to use __setitem__ rather than setObject

No longer use the zope container adapter.


=== Zope3/src/zope/app/dav/mkcol.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/dav/mkcol.py:1.1	Mon Jun 23 13:21:08 2003
+++ Zope3/src/zope/app/dav/mkcol.py	Sun Sep 21 13:32:03 2003
@@ -17,7 +17,6 @@
 
 from zope.app.interfaces.file import IWriteDirectory
 from zope.app.interfaces.file import IDirectoryFactory
-from zope.app.interfaces.container import IZopeWriteContainer
 from zope.app.event import publish
 from zope.app.event.objectevent import ObjectCreatedEvent
 from zope.component import queryAdapter, getAdapter
@@ -48,12 +47,10 @@
             request.response.setStatus(403)
             return ''
 
-        dir = getAdapter(dir, IZopeWriteContainer)
-
         factory = getAdapter(container, IDirectoryFactory)
         newdir = factory(name)
         publish(self.context, ObjectCreatedEvent(newdir))
-        dir.setObject(name, newdir)
+        dir[name] = newdir
 
         request.response.setStatus(201)
         return ''




More information about the Zope3-Checkins mailing list