From: Zooko O'Whielacronx Date: Mon, 2 Apr 2007 17:23:24 +0000 (-0700) Subject: tidiness: return res from logging of progress X-Git-Url: https://git.rkrishnan.org/specifications/components/COPYING.GPL?a=commitdiff_plain;h=cd4472003bf93b45b563b571aa2690c669a09843;p=tahoe-lafs%2Ftahoe-lafs.git tidiness: return res from logging of progress --- diff --git a/src/allmydata/encode_new.py b/src/allmydata/encode_new.py index f449176c..a0e92922 100644 --- a/src/allmydata/encode_new.py +++ b/src/allmydata/encode_new.py @@ -222,7 +222,10 @@ class Encoder(object): subshare_hash = hashutil.tagged_hash("encoded subshare", subshare) self.subshare_hashes[shareid].append(subshare_hash) dl = defer.DeferredList(dl) - dl.addCallback(lambda res: log.msg("%s uploaded %s / %s bytes of your file." % (self, self.segment_size*(segnum+1), self.segment_size*self.num_segments))) + def _logit(res): + log.msg("%s uploaded %s / %s bytes of your file." % (self, self.segment_size*(segnum+1), self.segment_size*self.num_segments)) + return res + dl.addCallback(_logit) return dl def send_subshare(self, shareid, segment_num, subshare):