[PEAK] PyProtocols bug

Radek Kanovsky rk at dat.cz
Thu Dec 4 14:50:52 EST 2003


Hi,

I feel like debugger today :-)  protocols.Variation doesn't work.

RadekK




diff -u -r1.1.1.1 src/protocols/interfaces.py
--- interfaces.py       30 Sep 2003 11:44:49 -0000      1.1.1.1
+++ interfaces.py       4 Dec 2003 19:43:48 -0000
@@ -260,7 +260,7 @@
         # Note: Protocol is a ``classic'' class, so we don't use
         # super()
         Protocol.__init__(self)
 
-        declareAdapterForProtocol(self,NO_ADAPTER_NEEDED,baseProtocol)
+        api.declareAdapterForProtocol(self,NO_ADAPTER_NEEDED,baseProtocol)
 
 
     def __repr__(self):
@@ -268,7 +268,7 @@
         if self.context is None:
             return "Variation(%r)" % self.baseProtocol
 
-        return "Variation(%r,%r)" % self.baseProtocol, self.context
+        return "Variation(%r,%r)" % (self.baseProtocol, self.context)






More information about the PEAK mailing list