Python 3.9 asyncio: Task cancel() throws asyncio.exceptions.CancelledError instead of asyncio.CancelledError
Clint Olsen
clint.olsen at gmail.com
Fri Mar 31 18:54:55 EDT 2023
On Friday, March 31, 2023 at 3:23:24 PM UTC-7, Chris Angelico wrote:
> On Sat, 1 Apr 2023 at 09:19, Clint Olsen <xxx... at gmail.com> wrote:
> > Attempting to catch asyncio.CancelledError or asyncio.CancelledError does not work. The function in question looks like:
> >>> asyncio.exceptions.CancelledError is asyncio.CancelledError
> True
>
> Does that answer the question?
No, I couldn't catch either exception even though they are the same.
-Clint
More information about the Python-list
mailing list