mirror of
https://github.com/Jylpah/blitz-tools.git
synced 2026-10-21 10:17:05 +02:00
Fix: Removed use of private exception classes
removed referenfces to: - concurrent.futures._base.CancelledError - asyncio.exceptions.CancelledError
This commit is contained in:
1 parent
c9745fcf5c
commit
3e27bd995e
2 files changed
+5
-5
No files matched your search
+3
-3
@@ -103,7 +103,7 @@ class ThrottledClientSession(aiohttp.ClientSession):
|
||||
if self._fillerTask != None:
|
||||
self._fillerTask.cancel()
|
||||
await asyncio.wait_for(self._fillerTask, timeout= 0.5)
|
||||
except (asyncio.exceptions.CancelledError, asyncio.TimeoutError):
|
||||
except (asyncio.CancelledError, asyncio.TimeoutError):
|
||||
pass
|
||||
await super().close()
|
||||
|
||||
@@ -147,7 +147,7 @@ class ThrottledClientSession(aiohttp.ClientSession):
|
||||
self._queue.put_nowait(i)
|
||||
updated_at = now
|
||||
await asyncio.sleep(sleep)
|
||||
except (asyncio.exceptions.CancelledError, asyncio.CancelledError):
|
||||
except asyncio.CancelledError:
|
||||
debug('Cancelled')
|
||||
except Exception as err:
|
||||
error(exception=err)
|
||||
@@ -1474,7 +1474,7 @@ class WG:
|
||||
else:
|
||||
error('Function to saves stats type \'' + stats_type + '\' is not implemented yet')
|
||||
|
||||
except (asyncio.CancelledError):
|
||||
except asyncio.CancelledError:
|
||||
# this is an eternal loop that will wait until cancelled
|
||||
return None
|
||||
|
||||
|
||||
Reference in new issue
Block a user