extmod/uasyncio: Fix gather returning exceptions from a cancelled task.
Fixes issue #5882.
This commit is contained in:
@@ -66,7 +66,7 @@ async def gather(*aws, return_exceptions=False):
|
||||
# # cancel all waiting tasks
|
||||
# raise er
|
||||
ts[i] = await ts[i]
|
||||
except Exception as er:
|
||||
except (core.CancelledError, Exception) as er:
|
||||
if return_exceptions:
|
||||
ts[i] = er
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user