[Zope3-checkins] CVS: Zope3/src/zope/app/http - delete.py:1.5 put.py:1.8

Jim Fulton jim at zope.com
Sat Mar 6 11:50:58 EST 2004


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

Modified Files:
	delete.py put.py 
Log Message:
Converted most getAdapter calls to use interface calls instead.


=== Zope3/src/zope/app/http/delete.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/http/delete.py:1.4	Sun Sep 21 13:32:16 2003
+++ Zope3/src/zope/app/http/delete.py	Sat Mar  6 11:50:24 2004
@@ -17,7 +17,6 @@
 """
 __metaclass__ = type
 
-from zope.component import getAdapter
 from zope.app.interfaces.file import IWriteDirectory
 
 class DELETE:
@@ -37,7 +36,7 @@
 
 
         # Get a "directory" surrogate for the container
-        dir = getAdapter(container, IWriteDirectory)
+        dir = IWriteDirectory(container)
 
         del dir[name]
 


=== Zope3/src/zope/app/http/put.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/http/put.py:1.7	Sun Sep 21 13:32:14 2003
+++ Zope3/src/zope/app/http/put.py	Sat Mar  6 11:50:24 2004
@@ -17,7 +17,7 @@
 """
 __metaclass__ = type
 
-from zope.component import getAdapter, queryAdapter, queryNamedAdapter
+from zope.component import queryAdapter, queryNamedAdapter
 from zope.app.interfaces.http import INullResource
 from zope.app.interfaces.file import IWriteFile, IWriteDirectory, IFileFactory
 from zope.app.event import publish
@@ -73,7 +73,7 @@
 
         # Fall back to a non-custom one
         if factory is None:
-            factory = getAdapter(container, IFileFactory)
+            factory = IFileFactory(container)
 
         # XXX Need to add support for large files
         data = body.read()
@@ -105,7 +105,7 @@
 
         body = self.request.bodyFile
         file = self.context
-        adapter = getAdapter(file, IWriteFile)
+        adapter = IWriteFile(file)
 
         # XXX Need to add support for large files
         data = body.read()




More information about the Zope3-Checkins mailing list