From ef73ebaf0ae9dcf997d2393f95f27cdf378374c4 Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@allmydata.com>
Date: Wed, 24 Jan 2007 17:23:22 -0700
Subject: [PATCH] download: update all users to match Zooko's change to
 ICodecDecoder.decode (as it now returns a list instead of a single string)

---
 src/allmydata/download.py        | 3 ++-
 src/allmydata/test/test_codec.py | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

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)
 
-- 
2.45.2