Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit da33b9c

Browse files
fix: fix mytest for timeout
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
1 parent 2e64a1c commit da33b9c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

google/auth/aio/transport/sessions.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,11 @@ async def request(
247247
self._auth_request, method, url, headers
248248
)
249249
)
250-
# Narrow the type: if it's an aiohttp.ClientTimeout, extract the float 'total'
251-
timeout_float = timeout.total if hasattr(timeout, "total") else timeout
250+
if timeout is None:
251+
timeout_float = 0.0 # Or your preferred default numeric timeout
252+
else:
253+
# Narrow the type: if it's an aiohttp.ClientTimeout, extract the float 'total'
254+
timeout_float = timeout.total if hasattr(timeout, "total") else timeout
252255
# Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch`
253256
# See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372
254257
async for _ in retries: # pragma: no branch

0 commit comments

Comments
 (0)