From c54783f5e1b4cac23d4adfaba2d654e65d6c330b Mon Sep 17 00:00:00 2001 From: Zooko O'Whielacronx Date: Sun, 21 Dec 2008 17:41:35 -0700 Subject: [PATCH] immutable: don't catch all exception when downloading, catch only DeadReferenceError and IntegrityCheckReject --- src/allmydata/immutable/download.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/allmydata/immutable/download.py b/src/allmydata/immutable/download.py index c6390beb..54b37a2a 100644 --- a/src/allmydata/immutable/download.py +++ b/src/allmydata/immutable/download.py @@ -489,11 +489,8 @@ class BlockDownloader(log.PrefixingLogMixin): self.parent.hold_block(self.blocknum, data) def _got_block_error(self, f): - level = log.WEIRD - if f.check(DeadReferenceError): - level = log.UNUSUAL - self.log("BlockDownloader[%d] got error" % self.blocknum, - failure=f, level=level, umid="5Z4uHQ") + failtype = f.trap(DeadReferenceError, IntegrityCheckReject) + self.log("failure to get block", level=log.UNUSUAL, umid="5Z4uHQ") if self.results: peerid = self.vbucket.bucket.get_peerid() self.results.server_problems[peerid] = str(f) -- 2.45.2