download: update all users to match Zooko's change to ICodecDecoder.decode (as it now returns a list instead of a single string)
This commit is contained in:
parent
833ef86a88
commit
ef73ebaf0a
|
@ -127,7 +127,8 @@ class FileDownloader:
|
||||||
|
|
||||||
d.addCallback(lambda res: self._decoder.decode(shares))
|
d.addCallback(lambda res: self._decoder.decode(shares))
|
||||||
|
|
||||||
def _write(data):
|
def _write(decoded_shares):
|
||||||
|
data = "".join(decoded_shares)
|
||||||
self._target.open()
|
self._target.open()
|
||||||
hasher = sha.new(netstring("allmydata_v1_verifierid"))
|
hasher = sha.new(netstring("allmydata_v1_verifierid"))
|
||||||
hasher.update(data)
|
hasher.update(data)
|
||||||
|
|
|
@ -34,7 +34,8 @@ class Tester:
|
||||||
d1 = dec.decode(shares)
|
d1 = dec.decode(shares)
|
||||||
return d1
|
return d1
|
||||||
|
|
||||||
def _check_data(data1):
|
def _check_data(decoded_shares):
|
||||||
|
data1 = "".join(decoded_shares)
|
||||||
self.failUnlessEqual(len(data1), len(data0))
|
self.failUnlessEqual(len(data1), len(data0))
|
||||||
self.failUnless(data1 == data0)
|
self.failUnless(data1 == data0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue