]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
test_client.py, upload.py:: remove KiB/MiB/etc constants, and other dead code
authorBrian Warner <warner@lothar.com>
Sun, 27 Feb 2011 02:10:51 +0000 (19:10 -0700)
committerBrian Warner <warner@lothar.com>
Sun, 27 Feb 2011 02:10:51 +0000 (19:10 -0700)
src/allmydata/immutable/upload.py
src/allmydata/test/test_client.py

index a53f12a26aee22c1e1fe1a40ca6e8571e3fdbc22..66bf3c4e1a7069a1e4e3c1e15c6938d64ee7e96e 100644 (file)
@@ -28,16 +28,6 @@ from pycryptopp.cipher.aes import AES
 from cStringIO import StringIO
 
 
-KiB=1024
-MiB=1024*KiB
-GiB=1024*MiB
-TiB=1024*GiB
-PiB=1024*TiB
-
-class HaveAllPeersError(Exception):
-    # we use this to jump out of the loop
-    pass
-
 # this wants to live in storage, not here
 class TooFullError(Exception):
     pass
index abf63aa7678aae8911170764240e369e95b43356..b0aea3d5c5c10a9912ef22cddbd0e2d02846648f 100644 (file)
@@ -7,22 +7,12 @@ from twisted.python import log
 import allmydata
 from allmydata import client
 from allmydata.storage_client import StorageFarmBroker
-from allmydata.introducer.client import IntroducerClient
 from allmydata.util import base32, fileutil
 from allmydata.interfaces import IFilesystemNode, IFileNode, \
      IImmutableFileNode, IMutableFileNode, IDirectoryNode
 from foolscap.api import flushEventualQueue
 import allmydata.test.common_util as testutil
 
-class FakeIntroducerClient(IntroducerClient):
-    def __init__(self):
-        self._connections = set()
-    def add_peer(self, nodeid):
-        entry = (nodeid, "storage", "rref")
-        self._connections.add(entry)
-    def remove_all_peers(self):
-        self._connections.clear()
-
 BASECONFIG = ("[client]\n"
               "introducer.furl = \n"
               )