[Zope3-checkins] CVS: Zope3/src/zope/app - configuration.py:1.1.2.2

Philipp von Weitershausen philikon at philikon.de
Tue Aug 5 20:03:40 EDT 2003


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

Modified Files:
      Tag: zcml-interface-field-branch
	configuration.py 
Log Message:
Move the special handlings for '*' meaning None for interfaces from
GlobalObject to InterfaceField, where it belongs.


=== Zope3/src/zope/app/configuration.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/configuration.py:1.1.2.1	Mon Aug  4 11:34:13 2003
+++ Zope3/src/zope/app/configuration.py	Tue Aug  5 19:03:05 2003
@@ -103,7 +103,9 @@
     Traceback (most recent call last):
     ...
     TypeError: not an interface
-    
+
+    >>> field.fromUnicode('*')
+    >>>
     
     """
 
@@ -113,6 +115,11 @@
             raise TypeError, "not an interface"
 
     def fromUnicode(self, id):
+        # special case: * means all interfaces which essentially means
+        # None
+        if id == '*':
+            return None
+
         context = self.context
         interfaceService = context.getService(Interfaces)
         interface = interfaceService.queryInterface(id, None)




More information about the Zope3-Checkins mailing list