From: Brian Warner Date: Thu, 31 Jan 2008 02:41:43 +0000 (-0700) Subject: upload: oops, fix breakage after removing upload_file/upload_data/etc X-Git-Url: https://git.rkrishnan.org/listings/configuration.rst?a=commitdiff_plain;h=22071c00e0ebc7df4ca6385c628095cbce3e24b5;p=tahoe-lafs%2Ftahoe-lafs.git upload: oops, fix breakage after removing upload_file/upload_data/etc --- diff --git a/src/allmydata/interfaces.py b/src/allmydata/interfaces.py index bbc354ee..604b5961 100644 --- a/src/allmydata/interfaces.py +++ b/src/allmydata/interfaces.py @@ -1107,14 +1107,6 @@ class IUploader(Interface): def upload_ssk(write_capability, new_version, uploadable): """TODO: how should this work?""" - def upload_data(data): - """Like upload(), but accepts a string.""" - - def upload_filename(filename): - """Like upload(), but accepts an absolute pathname.""" - - def upload_filehandle(filehane): - """Like upload(), but accepts an open filehandle.""" class IChecker(Interface): def check(uri_to_check): diff --git a/src/allmydata/test/check_memory.py b/src/allmydata/test/check_memory.py index e45fabb3..53977d91 100644 --- a/src/allmydata/test/check_memory.py +++ b/src/allmydata/test/check_memory.py @@ -5,7 +5,7 @@ from cStringIO import StringIO from twisted.internet import defer, reactor, protocol, error from twisted.application import service, internet from twisted.web import client as tw_client -from allmydata import client, introducer +from allmydata import client, introducer, upload from allmydata.scripts import create_node from allmydata.util import testutil, fileutil import foolscap @@ -393,7 +393,7 @@ this file are ignored. files[name] = self.create_data(name, size) u = self.nodes[0].getServiceNamed("uploader") d = self.nodes[0].debug_wait_for_client_connections(self.numnodes+1) - d.addCallback(lambda res: u.upload_filename(files[name])) + d.addCallback(lambda res: u.upload(upload.FileName(files[name]))) else: raise RuntimeError("unknown mode=%s" % self.mode) def _complete(uri):