summaryrefslogtreecommitdiff
path: root/extmod/uasyncio/funcs.py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-11-17 13:45:42 +1100
committerDamien George <damien@micropython.org>2021-11-17 14:11:31 +1100
commit43d08688c398184013bbfb0190e2529e4032e003 (patch)
tree08880ce3322ac038695ad3f3fb7249635b2ab4db /extmod/uasyncio/funcs.py
parent5cf71b55960651fc506df0ac41490f12dd1d63fd (diff)
extmod/uasyncio: Fix gather returning exceptions from a cancelled task.
Fixes issue #5882.
Diffstat (limited to 'extmod/uasyncio/funcs.py')
-rw-r--r--extmod/uasyncio/funcs.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/uasyncio/funcs.py b/extmod/uasyncio/funcs.py
index 93f4fd256..0ce48b015 100644
--- a/extmod/uasyncio/funcs.py
+++ b/extmod/uasyncio/funcs.py
@@ -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: