swiftly/client/manager.py
def get_client(self):
        """
        Obtains a client for use, whether an existing unused client
        or a brand new one if none are available.
        """
        client = None
        try:
            client = self.clients.get(block=False)
        except queue.Empty:
            pass
        if not client:
            self.client_id += 1
            kwargs = dict(self.kwargs)
            kwargs['verbose_id'] = kwargs.get(
                'verbose_id', '') + str(self.client_id)
            client = self.client_class(*self.args, **kwargs)
        return client
def get_client(self):
        client = None
        try:
            client = self.clients.get(block=False)
        except queue.Empty:
            pass
        if not client:
            self.client_id += 1
            kwargs = dict(self.kwargs)
            kwargs['verbose_id'] = kwargs.get(
                'verbose_id', '') + str(self.client_id)
            client = self.client_class(*self.args, **kwargs)
        return client
def get_client ( self ) : client = None try : client = self . clients . get ( block = False ) except queue . Empty : pass if not client : self . client_id += 1 kwargs = dict ( self . kwargs ) kwargs [ 'verbose_id' ] = kwargs . get ( 'verbose_id' , '' ) + str ( self . client_id ) client = self . client_class ( * self . args , * * kwargs ) return client
Obtains a client for use, whether an existing unused client
        or a brand new one if none are available.
Obtains a client for use whether an existing unused client or a brand new one if none are available .