mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 09:58:50 +08:00
If func
throws, then ret
will never be assigned, and accessed later.
Thus we now initiailize it with None so that it will always have a value.
This commit is contained in:
parent
100afcd4f8
commit
40b290b7de
@ -264,6 +264,7 @@ def transactional(*tr_args, **tr_kwargs):
|
||||
# last = start
|
||||
|
||||
while not committed:
|
||||
ret = None
|
||||
try:
|
||||
ret = func(*largs, **kwargs)
|
||||
tr.commit().wait()
|
||||
|
Loading…
x
Reference in New Issue
Block a user