summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Köck <kevin.koeck@gmx.net>2020-03-28 14:55:59 +0100
committerDamien George <damien.p.george@gmail.com>2020-04-02 00:40:23 +1100
commitaca19c25d250b8abb91211e2392e01b5611325c9 (patch)
tree85b266920485e512e72504374e85e6fc6403cc31
parentb389bc0afaaa5a16dc11daaed056d89ea3da3b83 (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.
-rw-r--r--extmod/uasyncio/lock.py2
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()