Hello,

In twisted 2.4 errbacks are not processed outside exceptions. The attached patch seems to resolve the problem.

--
Best regards,
Alexei


--- apt_proxy.py.old	2006-08-10 18:47:13.000000000 +0600
+++ apt_proxy.py	2006-08-10 18:47:42.000000000 +0600
@@ -1555,7 +1555,10 @@
             elif last_access < min_time:
                 log.debug("file is too old: "+self.local_file, 'file_ok')
                 update_times[self.uri] = cur_time
-                deferred.errback()
+		# Since version 2.4 twisted processes errbacks only inside an
+		# exception. So we have to raise this dummy exception.
+		try: raise Exception
+                except: deferred.errback()
             else:
                 log.debug("file is ok: "+self.local_file, 'file_ok')
                 deferred.callback(None)
@@ -1568,7 +1571,8 @@
                                            (deferred, self), None,
                                            None, None)
         else:
-            deferred.errback()
+	    try: raise Exception
+            except: deferred.errback()
         return deferred
         
     def connectionLost(self, reason=None):

Reply via email to