diff options
author | Kevin Köck <kevin.koeck@gmx.net> | 2020-03-28 14:55:59 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-04-02 00:40:23 +1100 |
commit | aca19c25d250b8abb91211e2392e01b5611325c9 (patch) | |
tree | 85b266920485e512e72504374e85e6fc6403cc31 /extmod/uasyncio/lock.py | |
parent | b389bc0afaaa5a16dc11daaed056d89ea3da3b83 (diff) |
extmod/uasyncio: Add error message to Lock.release's RuntimeError.
Otherwise it can be hard to understand what the error is if a blank
RuntimeError is raised.
Diffstat (limited to 'extmod/uasyncio/lock.py')
-rw-r--r-- | extmod/uasyncio/lock.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/uasyncio/lock.py b/extmod/uasyncio/lock.py index 18a55cb48..bddca295b 100644 --- a/extmod/uasyncio/lock.py +++ b/extmod/uasyncio/lock.py @@ -19,7 +19,7 @@ class Lock: def release(self): if self.state != 1: - raise RuntimeError + raise RuntimeError("Lock not acquired") if self.waiting.peek(): # Task(s) waiting on lock, schedule next Task self.state = self.waiting.pop_head() |