Skip to content

Commit 2bfed3f

Browse files
authored
Merge branch 'master' into fix-client-list-with-multiple-client-ids
2 parents 246fee3 + 20c4475 commit 2bfed3f

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/workflows/spellcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
- name: Checkout
99
uses: actions/checkout@v4
1010
- name: Check Spelling
11-
uses: rojopolis/spellcheck-github-actions@0.38.0
11+
uses: rojopolis/spellcheck-github-actions@0.47.0
1212
with:
1313
config_path: .github/spellcheck-settings.yml
1414
task_name: Markdown

redis/asyncio/lock.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,10 @@ def release(self) -> Awaitable[None]:
249249
"""Releases the already acquired lock"""
250250
expected_token = self.local.token
251251
if expected_token is None:
252-
raise LockError("Cannot release an unlocked lock")
252+
raise LockError(
253+
"Cannot release a lock that's not owned or is already unlocked.",
254+
lock_name=self.name,
255+
)
253256
self.local.token = None
254257
return self.do_release(expected_token)
255258

redis/lock.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,10 @@ def release(self) -> None:
251251
"""
252252
expected_token = self.local.token
253253
if expected_token is None:
254-
raise LockError("Cannot release an unlocked lock", lock_name=self.name)
254+
raise LockError(
255+
"Cannot release a lock that's not owned or is already unlocked.",
256+
lock_name=self.name,
257+
)
255258
self.local.token = None
256259
self.do_release(expected_token)
257260

0 commit comments

Comments
 (0)