Make pylibmc.ClientPool signature backwards-compatible.

This commit is contained in:
lericson 2010-03-16 23:43:54 +01:00
parent 22f0cd6663
commit b3b36b3acb

View File

@ -156,9 +156,10 @@ class ClientPool(Queue):
True
"""
def __init__(self, mc, n_slots):
def __init__(self, mc=None, n_slots=None):
Queue.__init__(self, n_slots)
self.fill(mc, n_slots)
if mc is not None:
self.fill(mc, n_slots)
@contextmanager
def reserve(self, timeout=None):