From ca03987922ffea8facf742f0f5e608b96d5801f2 Mon Sep 17 00:00:00 2001 From: Vincent Texier <vit@free.fr> Date: Wed, 11 Jul 2018 11:38:18 +0200 Subject: [PATCH] issue #56 WIP - Fix client _endpoint type test --- duniterpy/api/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/duniterpy/api/client.py b/duniterpy/api/client.py index b7a73adc..9bbeecca 100644 --- a/duniterpy/api/client.py +++ b/duniterpy/api/client.py @@ -190,7 +190,7 @@ class Client: :param session: Aiohttp client session (optional, default None) :param proxy: Proxy server as hostname:port """ - if type(endpoint) is str: + if isinstance(_endpoint, str): # Endpoint Protocol detection self.endpoint = endpoint.endpoint(_endpoint) else: @@ -277,7 +277,7 @@ class Client: async def __call__(self, _function: Callable, *args: any, **kwargs: any) -> any: """ Call the _function given with the args given - So we can have use many packages wrapping a REST API + So we can have many packages wrapping a REST API :param _function: The function to call :param args: The parameters -- GitLab