1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-06-27 17:08:32 +00:00

Remove callables when writing --write-info-json

This commit is contained in:
coletdjnz 2025-06-22 10:19:27 +12:00
parent 308e62fa81
commit 2a59336eff
No known key found for this signature in database
GPG Key ID: 91984263BB39894A

View File

@ -3697,6 +3697,8 @@ def filter_fn(obj):
return list(map(filter_fn, obj))
elif obj is None or isinstance(obj, (str, int, float, bool)):
return obj
elif callable(obj):
return None
else:
return repr(obj)