[utils] devalue: Fix calling reviver on cached value (#15568)
Authored by: Grub4K
This commit is contained in:
parent
27afb31edc
commit
ede54330fb
2 changed files with 7 additions and 3 deletions
|
|
@ -62,10 +62,10 @@ def parse_iter(parsed: typing.Any, /, *, revivers: dict[str, collections.abc.Cal
|
|||
if isinstance(source, tuple):
|
||||
name, source, reviver = source
|
||||
try:
|
||||
resolved[source] = target[index] = reviver(target[index])
|
||||
target[index] = reviver(target[index])
|
||||
except Exception as error:
|
||||
yield TypeError(f'failed to parse {source} as {name!r}: {error}')
|
||||
resolved[source] = target[index] = None
|
||||
target[index] = None
|
||||
continue
|
||||
|
||||
if source in resolved:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue