From: Zooko O'Whielacronx Date: Mon, 22 Dec 2008 00:41:35 +0000 (-0700) Subject: immutable: don't catch all exception when downloading, catch only DeadReferenceError... X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/flags/somewhere?a=commitdiff_plain;h=c54783f5e1b4cac23d4adfaba2d654e65d6c330b;p=tahoe-lafs%2Ftahoe-lafs.git immutable: don't catch all exception when downloading, catch only DeadReferenceError and IntegrityCheckReject --- 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)