diff --git a/analyze_wotb_replays.py b/analyze_wotb_replays.py index eb5af23..1409771 100755 --- a/analyze_wotb_replays.py +++ b/analyze_wotb_replays.py @@ -1408,7 +1408,7 @@ async def main(argv): bu.error(exception=err) except UserWarning as err: bu.warning(str(err)) - except asyncio.exceptions.CancelledError: + except asyncio.CancelledError: pass except Exception as err: bu.error(exception=err) @@ -1798,7 +1798,7 @@ async def stat_worker(queue : asyncio.Queue, workerID: int, args : argparse.Name bu.error('Unexpected error', err, id=workerID) queue.task_done() - except (asyncio.CancelledError, concurrent.futures._base.CancelledError): + except (asyncio.CancelledError, concurrent.futures.CancelledError): bu.debug('Stats queue is empty', id=workerID) except Exception as err: bu.error(exception=err, id=workerID) diff --git a/blitzutils.py b/blitzutils.py index fa572d4..beb9e8f 100755 --- a/blitzutils.py +++ b/blitzutils.py @@ -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