[Zope-CVS] CVS: Products/Ape/lib/apelib/zope2 -
classifier.py:1.5.2.4
Shane Hathaway
shane at zope.com
Tue Dec 23 00:52:38 EST 2003
Update of /cvs-repository/Products/Ape/lib/apelib/zope2
In directory cvs.zope.org:/tmp/cvs-serv30737/lib/apelib/zope2
Modified Files:
Tag: ape-0_8-branch
classifier.py
Log Message:
The PostgreSQL tests now pass.
Some minor changes to interfaces were necessary in order to
find and call all database initializers.
=== Products/Ape/lib/apelib/zope2/classifier.py 1.5.2.3 => 1.5.2.4 ===
--- Products/Ape/lib/apelib/zope2/classifier.py:1.5.2.3 Sat Dec 20 23:24:08 2003
+++ Products/Ape/lib/apelib/zope2/classifier.py Tue Dec 23 00:52:37 2003
@@ -43,19 +43,16 @@
"""A classifier with some minimal Zope 2 extensions.
"""
__implements__ = IConfigurableClassifier
-
+ gateway = None
def __init__(self, gw=None):
- self.gw = gw
+ self.gateway = gw
self.oid_to_mapper = {}
self.class_to_mapper = {}
self.ext_to_mapper = {}
self.generic_to_mapper = {}
self.options = {} # { (mapper_name, option) -> value }
- def getGateway(self):
- return self.gw
-
def register(self, condition, value, mapper_name):
value = str(value) # Avoid unicode
if condition == 'extension':
@@ -121,7 +118,7 @@
mapper_name = self.oid_to_mapper.get(event.oid)
if mapper_name is not None:
return {'mapper_name': mapper_name}, mapper_name
- classification, serial = self.gw.load(event)
+ classification, serial = self.gateway.load(event)
class_name = classification.get('class_name')
if class_name and ':' in class_name:
# Backward compatibility
@@ -155,9 +152,3 @@
raise DeserializationError(
'No mapper known for class %s' % repr(class_name))
return classification, mapper_name
-
-
- def store(self, event, classification):
- """Stores the classification of an object."""
- return self.gw.store(event, classification)
-
More information about the Zope-CVS
mailing list