[Zope3-checkins] CVS: Zope3/src/zope/interface - surrogate.py:1.4
Jim Fulton
jim at zope.com
Mon Feb 9 03:20:11 EST 2004
Update of /cvs-repository/Zope3/src/zope/interface
In directory cvs.zope.org:/tmp/cvs-serv22644
Modified Files:
surrogate.py
Log Message:
Added logic to handle old (before subscription) data.
=== Zope3/src/zope/interface/surrogate.py 1.3 => 1.4 ===
--- Zope3/src/zope/interface/surrogate.py:1.3 Mon Feb 9 02:41:21 2004
+++ Zope3/src/zope/interface/surrogate.py Mon Feb 9 03:20:11 2004
@@ -999,7 +999,16 @@
multi = {}
registered = {}
# Add adapters and interfaces directly implied by same:
- for (subscription, with, name, target), factories in adapters.iteritems():
+
+ for key, factories in adapters.iteritems():
+
+ # XXX Backward compatability
+ # Don't need to handle 3-tuples some day
+ try:
+ (subscription, with, name, target) = key
+ except ValueError:
+ (with, name, target) = key
+ subscription = False
if with:
_add_multi_adapter(with, name, target, target, multi,
registered, factories, subscription)
More information about the Zope3-Checkins
mailing list