From f61bdbffd728b9dd361b1e359d2acf1aebcb380c Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@lothar.com>
Date: Fri, 23 Sep 2011 00:37:48 -0700
Subject: [PATCH] control.py: unbreak speed-test: overwrite() wants a
 MutableData, not str

Really, all the upload/modify APIs should take a string or a filehandle, and
internally wrap it as needed. Callers should not need to be aware of
Uploadable() or MutableData() classes.
---
 src/allmydata/control.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/allmydata/control.py b/src/allmydata/control.py
index f2f15505..fcde8fab 100644
--- a/src/allmydata/control.py
+++ b/src/allmydata/control.py
@@ -8,6 +8,7 @@ from foolscap.api import Referenceable
 from allmydata.interfaces import RIControlClient, IFileNode
 from allmydata.util import fileutil, mathutil
 from allmydata.immutable import upload
+from allmydata.mutable.publish import MutableData
 from twisted.python import log
 
 def get_memory_usage():
@@ -180,7 +181,7 @@ class SpeedTest:
                 d1.addCallback(lambda n: n.get_uri())
             elif self.mutable_mode == "upload":
                 data = open(fn,"rb").read()
-                d1 = self._n.overwrite(data)
+                d1 = self._n.overwrite(MutableData(data))
                 d1.addCallback(lambda res: self._n.get_uri())
             else:
                 up = upload.FileName(fn, convergence=None)
-- 
2.45.2