diff --git a/pyaviso/engine/etcd_grpc_engine.py b/pyaviso/engine/etcd_grpc_engine.py index 2e94ded..e071c00 100644 --- a/pyaviso/engine/etcd_grpc_engine.py +++ b/pyaviso/engine/etcd_grpc_engine.py @@ -33,7 +33,7 @@ def __init__(self, config: EngineConfig, auth: Auth): self._base_url = f"http://{self._host}:{self._port}/v3/" def _initialise_server(self): - if isinstance(self.auth, EtcdAuth): + if type(self.auth) == EtcdAuth: # noqa: E721 self._server = Etcd3Client( self.host, self.port, user=self.auth.username, password=self.auth.password, timeout=self.timeout ) diff --git a/pyaviso/engine/etcd_rest_engine.py b/pyaviso/engine/etcd_rest_engine.py index 32938e5..8a0c28b 100644 --- a/pyaviso/engine/etcd_rest_engine.py +++ b/pyaviso/engine/etcd_rest_engine.py @@ -247,7 +247,7 @@ def _authenticate(self) -> bool: This method authenticates the user and set the internal token, this is only done for Etcd authentication :return: True if successfully authenticated """ - if isinstance(self.auth, EtcdAuth): + if type(self.auth) == EtcdAuth: # noqa: E721 logger.debug(f"Authenticating user {self.auth.username}...") url = self._base_url + "auth/authenticate"