From 4e9e470c9ef68557ece11f59327e32d2be2c7b51 Mon Sep 17 00:00:00 2001 From: Mathieu Leplatre Date: Tue, 12 Nov 2024 17:08:24 +0100 Subject: [PATCH] Do not inspect type, just set the attr --- src/kinto_http/client.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/kinto_http/client.py b/src/kinto_http/client.py index 3117d54..6bb2c32 100644 --- a/src/kinto_http/client.py +++ b/src/kinto_http/client.py @@ -18,7 +18,6 @@ from kinto_http.constants import DO_NOT_OVERWRITE from kinto_http.endpoints import Endpoints from kinto_http.exceptions import BucketNotFound, CollectionNotFound, KintoException -from kinto_http.login import BrowserOAuth from kinto_http.patch_type import BasicPatch, PatchType from kinto_http.session import create_session @@ -49,8 +48,11 @@ def __init__( ): self.endpoints = Endpoints() - if isinstance(auth, BrowserOAuth): + try: + # See `BrowserOAuth` in login.py (for example). auth.server_url = server_url + except AttributeError: + pass session_kwargs = dict( server_url=server_url,