]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
servermap add-lease: fix the code that's supposed to catch remote IndexErrors, I...
authorBrian Warner <warner@allmydata.com>
Fri, 27 Feb 2009 08:04:26 +0000 (01:04 -0700)
committerBrian Warner <warner@allmydata.com>
Fri, 27 Feb 2009 08:04:26 +0000 (01:04 -0700)
src/allmydata/mutable/servermap.py

index 7c0918ce6a9170fed23b56b31ad030a3133450a8..7a9ccdc88c6aaafcf6732f44e119946534076e85 100644 (file)
@@ -6,7 +6,7 @@ from twisted.internet import defer
 from twisted.python import failure
 from foolscap import DeadReferenceError
 from foolscap.eventual import eventually
-from allmydata.util import base32, hashutil, idlib, log
+from allmydata.util import base32, hashutil, idlib, log, rrefutil
 from allmydata.storage.server import si_b2a
 from allmydata.interfaces import IServermapUpdaterStatus
 from pycryptopp.publickey import rsa
@@ -543,12 +543,12 @@ class ServermapUpdater:
             cancel_secret = self._node.get_cancel_secret(peerid)
             d2 = ss.callRemote("add_lease", storage_index,
                                renew_secret, cancel_secret)
-            dl = defer.DeferredList([d, d2])
+            dl = defer.DeferredList([d, d2], consumeErrors=True)
             def _done(res):
                 [(readv_success, readv_result),
                  (addlease_success, addlease_result)] = res
                 if (not addlease_success and
-                    not addlease_result.check(IndexError)):
+                    not rrefutil.check_remote(addlease_result, IndexError)):
                     # tahoe 1.3.0 raised IndexError on non-existant buckets,
                     # which we ignore. Unfortunately tahoe <1.3.0 had a bug
                     # and raised KeyError, which we report.