self._reconnector = None
self._trigger_cb = None
+ # Special methods used by copy.copy() and copy.deepcopy(). When those are
+ # used in allmydata.immutable.filenode to copy CheckResults during
+ # repair, we want it to treat the IServer instances as singletons, and
+ # not attempt to duplicate them..
+ def __copy__(self):
+ return self
+ def __deepcopy__(self, memodict):
+ return self
+
def __repr__(self):
return "<NativeStorageServer for %s>" % self.get_name()
def get_serverid(self):
from allmydata.util import fileutil, idlib, hashutil
from allmydata.util.hashutil import sha1
from allmydata.test.common_web import HTTPClientGETFactory
-from allmydata.interfaces import IStorageBroker
+from allmydata.interfaces import IStorageBroker, IServer
from allmydata.test.common import TEST_RSA_KEY_SIZE
return wrapper
class NoNetworkServer:
+ implements(IServer)
def __init__(self, serverid, rref):
self.serverid = serverid
self.rref = rref
def __repr__(self):
return "<NoNetworkServer for %s>" % self.get_name()
+ # Special method used by copy.copy() and copy.deepcopy(). When those are
+ # used in allmydata.immutable.filenode to copy CheckResults during
+ # repair, we want it to treat the IServer instances as singletons.
+ def __copy__(self):
+ return self
+ def __deepcopy__(self, memodict):
+ return self
def get_serverid(self):
return self.serverid
def get_permutation_seed(self):