Skip to content

Commit

Permalink
chore: clarify ambiguously-defined variable
Browse files Browse the repository at this point in the history
  • Loading branch information
h4l committed Feb 3, 2025
1 parent 800308e commit 5e4a2ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/denokv_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,12 @@ def atomic_write(
key_tuple = unpack(mut.key)
key_bytes = pack(unpack(mut.key))
except Exception as e:
key_tuple = None
key_bytes = None
cause = e
if key_bytes != mut.key:
raise ValueError(f"Mutation key is not valid: {mut.key!r}") from cause
assert key_tuple is not None

expires_at_ms = mut.expire_at_ms
if expires_at_ms < 0:
Expand Down

0 comments on commit 5e4a2ee

Please sign in to comment.