mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-04 10:10:58 +00:00
don't throw away unserializable parameter
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
This commit is contained in:
parent
57a0f76e1f
commit
1a12a8acdf
@ -335,7 +335,12 @@ def log_call_deferred(action_type):
|
||||
kwargs = {k: bytes_to_unicode(True, kw[k]) for k in kw}
|
||||
# Remove complex (unserializable) objects from positional args to
|
||||
# prevent eliot from throwing errors when it attempts serialization
|
||||
args = tuple([a[pos] for pos in range(len(a)) if is_json_serializable(a[pos])])
|
||||
args = tuple(
|
||||
a[pos]
|
||||
if is_json_serializable(a[pos])
|
||||
else str(a[pos])
|
||||
for pos in range(len(a))
|
||||
)
|
||||
with start_action(action_type=action_type, args=args, kwargs=kwargs).context():
|
||||
# Use addActionFinish so that the action finishes when the
|
||||
# Deferred fires.
|
||||
|
Loading…
x
Reference in New Issue
Block a user