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…
Reference in New Issue