]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
assert that only dicts get passed to _got_response()
authorZooko O'Whielacronx <zooko@zooko.com>
Sat, 31 Mar 2007 01:00:40 +0000 (18:00 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Sat, 31 Mar 2007 01:00:40 +0000 (18:00 -0700)
src/allmydata/download.py

index eacc9eff3ae1fae6a1371b9baf162677e2b1d247..12cc03de2941a4ab71aa22b81bc561fb63159fae 100644 (file)
@@ -187,6 +187,7 @@ class FileDownloader:
         return defer.DeferredList(dl)
 
     def _got_response(self, buckets, connection):
+        _assert(isinstance(buckets, dict), buckets) # soon foolscap will check this for us with its DictOf schema constraint
         for sharenum, bucket in buckets.iteritems():
             self._share_buckets.setdefault(sharenum, set()).add(bucket)