[Zope3-checkins] CVS: Zope3/src/zope/app/ftp - __init__.py:1.3
Jim Fulton
jim@zope.com
Wed, 21 May 2003 16:29:41 -0400
Update of /cvs-repository/Zope3/src/zope/app/ftp
In directory cvs.zope.org:/tmp/cvs-serv22522/src/zope/app/ftp
Modified Files:
__init__.py
Log Message:
Changed the API for handling named adapters. There is1
now a separate cleaner api for getting named adapters.
=== Zope3/src/zope/app/ftp/__init__.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/ftp/__init__.py:1.2 Thu Mar 13 13:49:07 2003
+++ Zope3/src/zope/app/ftp/__init__.py Wed May 21 16:29:10 2003
@@ -18,7 +18,7 @@
"""
__metaclass__ = type
-from zope.component import queryAdapter, getAdapter
+from zope.component import queryAdapter, getAdapter, queryNamedAdapter
from zope.app.interfaces.file import IReadFile, IWriteFile
from zope.app.interfaces.file import IReadDirectory, IWriteDirectory
from zope.app.interfaces.file import IFileFactory, IDirectoryFactory
@@ -209,7 +209,7 @@
dir = queryAdapter(self.context, IWriteDirectory)
dir = getAdapter(dir, IZopeWriteContainer)
- factory = queryAdapter(self.context, IFileFactory, name=ext)
+ factory = queryNamedAdapter(self.context, IFileFactory, ext)
if factory is None:
factory = getAdapter(self.context, IFileFactory)