]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
sendOnly: oops, I keep forgetting that you can't really use f.trap in a lambda, becau...
authorBrian Warner <warner@allmydata.com>
Wed, 10 Jan 2007 04:13:05 +0000 (21:13 -0700)
committerBrian Warner <warner@allmydata.com>
Wed, 10 Jan 2007 04:13:05 +0000 (21:13 -0700)
src/allmydata/queen.py

index 8e6885b28b014e5d6e91fb2a0bfa63d128dd9d5d..cb4596129ec54926cf1647bd12bb804542763eee 100644 (file)
@@ -14,7 +14,9 @@ from allmydata.filetable import GlobalVirtualDrive
 
 def sendOnly(call, methname, *args, **kwargs):
     d = call(methname, *args, **kwargs)
-    d.addErrback(lambda f: f.trap((ConnectionLost, ConnectionDone)))
+    def _trap(f):
+        f.trap(ConnectionLost, ConnectionDone)
+    d.addErrback(_trap)
 
 class Roster(service.MultiService, Referenceable):
     implements(RIQueenRoster)