[Twisted-Python] First contribution...

Sylane twisted at sylane.com
Tue Jan 14 09:46:34 MST 2003


Hello twisted people,

      I actually working on the simplistic implementation of a complex
      spread example... soon in your best mailing list...

      But for now a little diff for pb... I hop it will be applied
      because my example don't work very nice without it...

--snip-snip--------------------------------------------------------
--- ./twisted/spread/pb-orig.py  Tue Jan 14 17:12:47 2003
+++ ./twisted/spread/pb.py     Tue Jan 14 17:23:51 2003
@@ -543,8 +543,18 @@
                 try:
                     d.errback(failure.Failure(PBConnectionLost()))
                 except:
-                    log.deferr()
-        for notifier in self.disconnects:
+                    log.deferr()
+        # Assure all Cacheable.stoppedObserving are called
+        for lobj in self.remotelyCachedObjects.values():
+            cacheable = lobj.object
+            perspective = lobj.perspective
+            try:
+                cacheable.stoppedObserving(perspective, RemoteCacheObserver(self, cacheable, perspective))
+            except:
+                log.deferr()        
+        # Loop on a copy to prevent notifiers to mixup
+        # the list by calling dontNotifyOnDisconnect
+        for notifier in self.disconnects[:]:
             try:
                 notifier()
             except:
--snip-snip--------------------------------------------------------
  

-- 
Best regards,
 Sylane                          mailto:twisted at sylane.com





More information about the Twisted-Python mailing list