mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-04 10:10:58 +00:00
iterate over args directly without indexing
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
This commit is contained in:
parent
1a12a8acdf
commit
20ad6cd9e7
@ -335,12 +335,7 @@ 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]
|
||||
if is_json_serializable(a[pos])
|
||||
else str(a[pos])
|
||||
for pos in range(len(a))
|
||||
)
|
||||
args = tuple(arg if is_json_serializable(arg) else str(arg) for arg in 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