diff --git a/extmod/uasyncio/task.py b/extmod/uasyncio/task.py index 1d5bcc5cf7..1788cf0ed0 100644 --- a/extmod/uasyncio/task.py +++ b/extmod/uasyncio/task.py @@ -151,7 +151,7 @@ class Task: return False # Can't cancel self (not supported yet). 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. while isinstance(self.data, Task): self = self.data diff --git a/tests/extmod/uasyncio_cancel_self.py.exp b/tests/extmod/uasyncio_cancel_self.py.exp index 36fcb0a3f4..a34c73460b 100644 --- a/tests/extmod/uasyncio_cancel_self.py.exp +++ b/tests/extmod/uasyncio_cancel_self.py.exp @@ -1,2 +1,2 @@ task start -cannot cancel self +can't cancel self