From: Brian Warner Date: Thu, 25 Jan 2007 00:23:22 +0000 (-0700) Subject: download: update all users to match Zooko's change to ICodecDecoder.decode (as it... X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~323 X-Git-Url: https://git.rkrishnan.org/pf/content/it.html?a=commitdiff_plain;h=ef73ebaf0ae9dcf997d2393f95f27cdf378374c4;p=tahoe-lafs%2Ftahoe-lafs.git download: update all users to match Zooko's change to ICodecDecoder.decode (as it now returns a list instead of a single string) --- diff --git a/src/allmydata/download.py b/src/allmydata/download.py index 5051a1e4..ef855d15 100644 --- a/src/allmydata/download.py +++ b/src/allmydata/download.py @@ -127,7 +127,8 @@ class FileDownloader: d.addCallback(lambda res: self._decoder.decode(shares)) - def _write(data): + def _write(decoded_shares): + data = "".join(decoded_shares) self._target.open() hasher = sha.new(netstring("allmydata_v1_verifierid")) hasher.update(data) diff --git a/src/allmydata/test/test_codec.py b/src/allmydata/test/test_codec.py index d073ae8c..f7e84cef 100644 --- a/src/allmydata/test/test_codec.py +++ b/src/allmydata/test/test_codec.py @@ -34,7 +34,8 @@ class Tester: d1 = dec.decode(shares) return d1 - def _check_data(data1): + def _check_data(decoded_shares): + data1 = "".join(decoded_shares) self.failUnlessEqual(len(data1), len(data0)) self.failUnless(data1 == data0)