Fix cli discover bug with None username/password (#615)

This commit is contained in:
sdb9696
2024-01-04 18:17:48 +00:00
committed by GitHub
parent 1bb930b096
commit b156defc3c
3 changed files with 7 additions and 3 deletions

View File

@@ -100,7 +100,9 @@ class KlapTransport(BaseTransport):
self._default_http_client: Optional[httpx.AsyncClient] = None
self._local_seed: Optional[bytes] = None
if not self._credentials and not self._credentials_hash:
if (
not self._credentials or self._credentials.username is None
) and not self._credentials_hash:
self._credentials = Credentials()
if self._credentials:
self._local_auth_hash = self.generate_auth_hash(self._credentials)