Override clone on Client so that you can call str() on client instances from a ThreadMappedPool

int
Noah Silas 2010-06-21 04:04:25 +08:00 committed by Ludvig Ericson
parent 3cb953aee9
commit 314562c437
1 changed files with 7 additions and 0 deletions

View File

@ -183,6 +183,13 @@ class Client(_pylibmc.client):
def behaviours(self):
raise AttributeError("nobody uses british spellings")
def clone(self):
obj = super(Client, self).clone()
obj.addresses = list(self.addresses)
obj.binary = self.binary
return obj
from contextlib import contextmanager
class ClientPool(Queue):