From a65608fec191c8d20c944c3a374b6894ba3fe7c8 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 9 Jan 2007 21:13:05 -0700 Subject: [PATCH] sendOnly: oops, I keep forgetting that you can't really use f.trap in a lambda, because it returns the failure it trapped --- src/allmydata/queen.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/allmydata/queen.py b/src/allmydata/queen.py index 8e6885b2..cb459612 100644 --- a/src/allmydata/queen.py +++ b/src/allmydata/queen.py @@ -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) -- 2.45.2