Skip to content

Commit f9e29db

Browse files
authored
[cosmos] fix pylint (#40541)
* fix pylint * missed
1 parent 04a7438 commit f9e29db

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: sdk/cosmos/azure-cosmos/azure/cosmos/aio/_global_endpoint_manager_async.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
import asyncio # pylint: disable=do-not-import-asyncio
2727
import logging
28-
from asyncio import CancelledError
2928
from typing import Tuple
3029

3130
from azure.core.exceptions import AzureError
@@ -105,7 +104,7 @@ async def refresh_endpoint_list(self, database_account, **kwargs):
105104
try:
106105
await self.refresh_task
107106
self.refresh_task = None
108-
except (Exception, CancelledError) as exception: #pylint: disable=broad-exception-caught
107+
except (Exception, asyncio.CancelledError) as exception: #pylint: disable=broad-exception-caught
109108
logger.exception("Health check task failed: %s", exception)
110109
if self.location_cache.current_time_millis() - self.last_refresh_time > self.refresh_time_interval_in_ms:
111110
self.refresh_needed = True
@@ -217,5 +216,5 @@ async def close(self):
217216
self.refresh_task.cancel()
218217
try:
219218
await self.refresh_task
220-
except (Exception, CancelledError) : #pylint: disable=broad-exception-caught
219+
except (Exception, asyncio.CancelledError) : #pylint: disable=broad-exception-caught
221220
pass

0 commit comments

Comments
 (0)