This should at least be inside the finally of a try/finally so that exceptions in this unit do not fail subsequent units assuming to start from fresh.  Additionally the pattern could do with being factored out into a context manager, something like withClients(clientSpecs) where clientSpecs is a list of argument lists to pass to getClient.