Browse Source

extmod/uasyncio: Change cannot to can't in error message, and test exp.

Follow up to 8e048d2548 which missed these.
pull/5925/head
Damien George 5 years ago
parent
commit
5f0661b4fe
  1. 2
      extmod/uasyncio/task.py
  2. 2
      tests/extmod/uasyncio_cancel_self.py.exp

2
extmod/uasyncio/task.py

@ -151,7 +151,7 @@ class Task:
return False return False
# Can't cancel self (not supported yet). # Can't cancel self (not supported yet).
if self is core.cur_task: if self is core.cur_task:
raise RuntimeError("cannot cancel self") raise RuntimeError("can't cancel self")
# If Task waits on another task then forward the cancel to the one it's waiting on. # If Task waits on another task then forward the cancel to the one it's waiting on.
while isinstance(self.data, Task): while isinstance(self.data, Task):
self = self.data self = self.data

2
tests/extmod/uasyncio_cancel_self.py.exp

@ -1,2 +1,2 @@
task start task start
cannot cancel self can't cancel self

Loading…
Cancel
Save