diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2022-07-21 09:54:02 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-07-26 18:16:19 +1000 |
commit | b22abcdbbedb0f7583b19031fd65e19b3883671d (patch) | |
tree | cfafe633bf01c8e724363503b812b1317a828cee /extmod/uasyncio/funcs.py | |
parent | 092784da1948c6bfb224f8f6c593aff255ab2db0 (diff) |
extmod/uasyncio: Handle gather with no awaitables.
This previously resulted in gather() yielding but with no way to be
resumed.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'extmod/uasyncio/funcs.py')
-rw-r--r-- | extmod/uasyncio/funcs.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/extmod/uasyncio/funcs.py b/extmod/uasyncio/funcs.py index a1d38fbcb..96883e4fe 100644 --- a/extmod/uasyncio/funcs.py +++ b/extmod/uasyncio/funcs.py @@ -62,6 +62,9 @@ class _Remove: async def gather(*aws, return_exceptions=False): + if not aws: + return [] + def done(t, er): # Sub-task "t" has finished, with exception "er". nonlocal state |